[Python-checkins] python/dist/src/Lib/plat-mac bundlebuilder.py,1.16,1.17

jvr@users.sourceforge.net jvr@users.sourceforge.net
Wed, 26 Feb 2003 03:08:01 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv19718/Lib/plat-mac

Modified Files:
	bundlebuilder.py 
Log Message:
remove sitecustomize hack, will be solved elsewhere

Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** bundlebuilder.py	25 Feb 2003 22:58:33 -0000	1.16
--- bundlebuilder.py	26 Feb 2003 11:07:59 -0000	1.17
***************
*** 227,252 ****
  		return path, MAGIC + '\0\0\0\0' + marshal.dumps(code)
  
- #
- # The following snippet gets added as sitecustomize.py[co] to
- # non-standalone apps and appended to our custom site.py for
- # standalone apps. The bootstrap scripts calls os.execve() with
- # an argv[0] that's different from the actual executable: argv[0]
- # is the bootstrap script itself and matches the CFBundleExecutable
- # value in the Info.plist. This is needed to keep the Finder happy
- # and have the app work from the command line as well. However,
- # this causes sys.executable to also be that value, so we correct
- # that from the PYTHONEXECUTABLE environment variable that the
- # bootstrap script sets.
- # 
- SITECUSTOMIZE_PY = """\
- import sys, os
- executable = os.getenv("PYTHONEXECUTABLE")
- if executable is not None:
-     sys.executable = executable
- """
- 
- SITE_PY += SITECUSTOMIZE_PY
  SITE_CO = compile(SITE_PY, "<-bundlebuilder.py->", "exec")
- SITECUSTOMIZE_CO = compile(SITECUSTOMIZE_PY, "<-bundlebuilder.py->", "exec")
  
  #
--- 227,231 ----
***************
*** 456,463 ****
  		if self.standalone:
  			self.addPythonModules()
- 		else:
- 			sitecustomizepath = pathjoin(self.bundlepath, "Contents", "Resources",
- 					"sitecustomize" + PYC_EXT)
- 			writePyc(SITECUSTOMIZE_CO, sitecustomizepath)
  		if self.strip and not self.symlink:
  			self.stripBinaries()
--- 435,438 ----