diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-05-25 22:00:17 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-05-25 22:00:17 (GMT) |
commit | 8ba0e80117b57d45e39c3721ef032e7e901ccd16 (patch) | |
tree | b7d468dce1abef5435bd605827d3020dcd3912d6 /Mac/scripts | |
parent | 8d97b9bd36ad3437c2594deecf8b778e5508b8c1 (diff) | |
download | cpython-8ba0e80117b57d45e39c3721ef032e7e901ccd16.zip cpython-8ba0e80117b57d45e39c3721ef032e7e901ccd16.tar.gz cpython-8ba0e80117b57d45e39c3721ef032e7e901ccd16.tar.bz2 |
Added a --python option, which sets the python to be used in the #! line
in the bootstrap script of the applet.
Diffstat (limited to 'Mac/scripts')
-rw-r--r-- | Mac/scripts/BuildApplet.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Mac/scripts/BuildApplet.py b/Mac/scripts/BuildApplet.py index 64a3d5e..e954854 100644 --- a/Mac/scripts/BuildApplet.py +++ b/Mac/scripts/BuildApplet.py @@ -53,8 +53,8 @@ def buildapplet(): buildtools.process(template, filename, dstfilename, 1) else: - SHORTOPTS = "o:r:ne:v?" - LONGOPTS=("output=", "resource=", "noargv", "extra=", "verbose", "help") + SHORTOPTS = "o:r:ne:v?P" + LONGOPTS=("output=", "resource=", "noargv", "extra=", "verbose", "help", "python=") try: options, args = getopt.getopt(sys.argv[1:], SHORTOPTS, LONGOPTS) except getopt.error: @@ -78,6 +78,11 @@ def buildapplet(): if ':' in arg: arg = arg.split(':') extras.append(arg) + elif opt in ('-P', '--python'): + # This is a very dirty trick. We set sys.executable + # so that bundlebuilder will use this in the #! line + # for the applet bootstrap. + sys.executable = arg elif opt in ('-v', '--verbose'): verbose = Verbose() elif opt in ('-?', '--help'): |