diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-11-15 00:05:47 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-11-15 00:05:47 (GMT) |
commit | 25e61d9e0a0b779f1c48838bd09938bbf1631990 (patch) | |
tree | 5f50812c9a0fa04ad2bc612962c035b4b91b772d /Mac/Lib | |
parent | b54a6ce15456342dd61177b5261c242fcceb90de (diff) | |
download | cpython-25e61d9e0a0b779f1c48838bd09938bbf1631990.zip cpython-25e61d9e0a0b779f1c48838bd09938bbf1631990.tar.gz cpython-25e61d9e0a0b779f1c48838bd09938bbf1631990.tar.bz2 |
Added a hack so we can build applets with a MacPython that uses the
OSX 10.2 apple-supplied Python as its base: if we've copied a symlink
as the executable we remove it and install appletrunner in stead.
Diffstat (limited to 'Mac/Lib')
-rw-r--r-- | Mac/Lib/buildtools.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Mac/Lib/buildtools.py b/Mac/Lib/buildtools.py index 68a6614..01b5392 100644 --- a/Mac/Lib/buildtools.py +++ b/Mac/Lib/buildtools.py @@ -299,6 +299,17 @@ def process_common_macho(template, progress, code, rsrcname, destname, is_update "Contents/Resources/python.rsrc", ] copyapptree(template, destname, exceptlist, progress) + # SERIOUS HACK. If we've just copied a symlink as the + # executable we assume we're running from the MacPython addon + # to 10.2 python. We remove the symlink again and install + # the appletrunner script. + executable = os.path.join(destname, "Contents/MacOS/python") + if os.path.islink(executable): + os.remove(executable) + dummyfp, appletrunner, d2 = imp.find_module('appletrunner') + del dummyfp + shutil.copy2(appletrunner, executable) + os.chmod(executable, 0775) # Now either use the .plist file or the default if progress: progress.label('Create info.plist') |