summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-11-11 00:06:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-11-11 00:06:14 (GMT)
commiteb342298dea8ec3a9c16ba61061690bcf586c5cc (patch)
tree8f31e2bbbce985d6cf745f55c8b8b9a4cab31ff7 /Mac
parent7d996a2bb7027cfa3abd4fb5bdc910c82db67c9c (diff)
downloadcpython-eb342298dea8ec3a9c16ba61061690bcf586c5cc.zip
cpython-eb342298dea8ec3a9c16ba61061690bcf586c5cc.tar.gz
cpython-eb342298dea8ec3a9c16ba61061690bcf586c5cc.tar.bz2
- Use imp to find appletrawmain.py in stead of hand-crafting the path
to it. - Allow for symlinks in the applet template.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/buildtools.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Mac/Lib/buildtools.py b/Mac/Lib/buildtools.py
index 163f19a..68a6614 100644
--- a/Mac/Lib/buildtools.py
+++ b/Mac/Lib/buildtools.py
@@ -389,8 +389,8 @@ def process_common_macho(template, progress, code, rsrcname, destname, is_update
if progress:
progress.label('Creating __rawmain__.pyc')
progress.inc(0)
- rawsourcefile = os.path.join(sys.prefix, 'Mac', 'Lib', 'appletrawmain.py')
- rawsource = open(rawsourcefile, 'rU').read()
+ rawsourcefp, rawsourcefile, d2 = imp.find_module('appletrawmain')
+ rawsource = rawsourcefp.read()
rawcode = compile(rawsource, rawsourcefile, 'exec')
writepycfile(rawcode, outputfilename)
@@ -488,6 +488,9 @@ def copyapptree(srctree, dsttree, exceptlist=[], progress=None):
dstpath = os.path.join(dsttree, this)
if os.path.isdir(srcpath):
os.mkdir(dstpath)
+ elif os.path.islink(srcpath):
+ endpoint = os.readlink(srcpath)
+ os.symlink(endpoint, dstpath)
else:
if progress:
progress.label('Copy '+this)