[Python-checkins] python/dist/src/Lib/plat-mac bundlebuilder.py,1.17,1.18
jvr@users.sourceforge.net
jvr@users.sourceforge.net
Wed, 26 Feb 2003 03:27:59 -0800
Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv26822/Lib/plat-mac
Modified Files:
bundlebuilder.py
Log Message:
use the same Python for running the bootstrap script and the main program
Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** bundlebuilder.py 26 Feb 2003 11:07:59 -0000 1.17
--- bundlebuilder.py 26 Feb 2003 11:27:56 -0000 1.18
***************
*** 267,271 ****
#
BOOTSTRAP_SCRIPT = """\
! #!/usr/bin/env python
import sys, os
--- 267,271 ----
#
BOOTSTRAP_SCRIPT = """\
! #!%(hashbang)s
import sys, os
***************
*** 424,427 ****
--- 424,435 ----
bootstrappath = pathjoin(execdir, self.name)
makedirs(execdir)
+ if self.standalone:
+ # XXX we're screwed when the end user has deleted
+ # /usr/bin/python
+ hashbang = "/usr/bin/python"
+ else:
+ hashbang = sys.executable
+ while os.path.islink(hashbang):
+ hashbang = os.readlink(hashbang)
open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
os.chmod(bootstrappath, 0775)