From ec5a3c3d147ad577b86d735a3056ed63e67a826e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 21 Mar 2003 22:37:09 +0000 Subject: [PATCH] If not building standalone then PYTHONHOME shoudl not be set. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/mac/bundlebuilder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wxPython/distrib/mac/bundlebuilder.py b/wxPython/distrib/mac/bundlebuilder.py index 2a324993ed..ac810440b5 100644 --- a/wxPython/distrib/mac/bundlebuilder.py +++ b/wxPython/distrib/mac/bundlebuilder.py @@ -280,7 +280,7 @@ mainprogram = os.path.join(resdir, "%(mainprogram)s") sys.argv.insert(1, mainprogram) os.environ["PYTHONPATH"] = resdir -os.environ["PYTHONHOME"] = resdir +%(pythonhome)s os.environ["PYTHONEXECUTABLE"] = executable os.environ["DYLD_LIBRARY_PATH"] = libdir os.execve(executable, sys.argv, os.environ) @@ -330,7 +330,7 @@ class AppBuilder(BundleBuilder): # If True, build standalone app. standalone = 0 - + # If True, add a real main program that emulates sys.argv before calling # mainprogram argv_emulation = 0 @@ -441,10 +441,12 @@ class AppBuilder(BundleBuilder): # XXX we're screwed when the end user has deleted # /usr/bin/python hashbang = "/usr/bin/python" + pythonhome = 'os.environ["PYTHONHOME"] = resdir' else: hashbang = sys.executable while os.path.islink(hashbang): hashbang = os.readlink(hashbang) + pythonhome = '' open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals()) os.chmod(bootstrappath, 0775)