From 82ad32ec394ef9e20a5073e0dad13436972b10fa Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Fri, 21 Mar 2003 11:32:37 +0000 Subject: [PATCH] only set $PYTHONHOME when building a standalone app. --- Lib/plat-mac/bundlebuilder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py index 2a324993edf..86f5e49aafd 100755 --- a/Lib/plat-mac/bundlebuilder.py +++ b/Lib/plat-mac/bundlebuilder.py @@ -280,7 +280,8 @@ mainprogram = os.path.join(resdir, "%(mainprogram)s") sys.argv.insert(1, mainprogram) os.environ["PYTHONPATH"] = resdir -os.environ["PYTHONHOME"] = resdir +if %(standalone)s: + os.environ["PYTHONHOME"] = resdir os.environ["PYTHONEXECUTABLE"] = executable os.environ["DYLD_LIBRARY_PATH"] = libdir os.execve(executable, sys.argv, os.environ) @@ -445,6 +446,7 @@ class AppBuilder(BundleBuilder): hashbang = sys.executable while os.path.islink(hashbang): hashbang = os.readlink(hashbang) + standalone = self.standalone open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals()) os.chmod(bootstrappath, 0775)