diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-03-29 13:53:19 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-03-29 13:53:19 (GMT) |
commit | 2e2546c5fd8c2d13a323637065fc0f7e4d76604d (patch) | |
tree | 016ebdee3f4c265784bb215b7e38037f9d68f26b | |
parent | 9bfae985abfcfc444754be9579d654f765e062dc (diff) | |
download | cpython-2e2546c5fd8c2d13a323637065fc0f7e4d76604d.zip cpython-2e2546c5fd8c2d13a323637065fc0f7e4d76604d.tar.gz cpython-2e2546c5fd8c2d13a323637065fc0f7e4d76604d.tar.bz2 |
On OSX always copy PythonCore. It turns out an orphaned alias in /Library/CFMSupport (happens when you remove python and aliased pythoncore) wreaks havoc with the system.
-rw-r--r-- | Mac/scripts/ConfigurePython.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Mac/scripts/ConfigurePython.py b/Mac/scripts/ConfigurePython.py index d5d6687..c1bfb2b 100644 --- a/Mac/scripts/ConfigurePython.py +++ b/Mac/scripts/ConfigurePython.py @@ -70,6 +70,22 @@ def mkcorealias(src, altsrc): os.unlink(dst) except os.error: pass + do_copy = ask_copy() + if do_copy: + macostools.copy(os.path.join(sys.exec_prefix, src), dst) + else: + macostools.mkalias(os.path.join(sys.exec_prefix, src), dst) + return 1 + +do_copy = None +def ask_copy(): + global do_copy + if do_copy != None: + return do_copy + # On OSX always copy + if gestalt.gestalt('sysv') > 0x9ff: + do_copy = 1 + return do_copy do_copy = 0 if macfs.FSSpec(sys.exec_prefix).as_tuple()[0] != -1: # XXXX try: @@ -79,11 +95,8 @@ def mkcorealias(src, altsrc): do_copy = 1 except ImportError: pass - if do_copy: - macostools.copy(os.path.join(sys.exec_prefix, src), dst) - else: - macostools.mkalias(os.path.join(sys.exec_prefix, src), dst) - return 1 + return do_copy + # Copied from fullbuild, should probably go to buildtools def buildapplet(top, dummy, list): |