Mercurial > cpython-lru_cache-weakref
diff Mac/scripts/ConfigurePython.py @ 17247:59472bcbfb8e legacy-trunk
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.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Thu, 29 Mar 2001 13:53:19 +0000 |
| parents | 1f700a7206b2 |
| children | 42b2f1936254 |
line wrap: on
line diff
--- a/Mac/scripts/ConfigurePython.py Thu Mar 29 13:52:16 2001 +0000 +++ b/Mac/scripts/ConfigurePython.py Thu Mar 29 13:53:19 2001 +0000 @@ -70,6 +70,22 @@ 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 @@ 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):
