Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/command/build_scripts.py @ 33266:4e9ecbf47b6b legacy-trunk
Patch #736857, #736859: Add -e option to build_scripts.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Wed, 25 Aug 2004 11:37:43 +0000 |
| parents | c3a096bfbd6b |
| children | 893d46576737 |
line wrap: on
line diff
--- a/Lib/distutils/command/build_scripts.py Wed Aug 25 11:24:42 2004 +0000 +++ b/Lib/distutils/command/build_scripts.py Wed Aug 25 11:37:43 2004 +0000 @@ -24,6 +24,7 @@ user_options = [ ('build-dir=', 'd', "directory to \"build\" (copy) to"), ('force', 'f', "forcibly build everything (ignore file timestamps"), + ('executable=', 'e', "specify final destination interpreter path"), ] boolean_options = ['force'] @@ -33,12 +34,14 @@ self.build_dir = None self.scripts = None self.force = None + self.executable = None self.outfiles = None def finalize_options (self): self.set_undefined_options('build', ('build_scripts', 'build_dir'), - ('force', 'force')) + ('force', 'force'), + ('executable', 'executable')) self.scripts = self.distribution.scripts def get_source_files(self): @@ -95,7 +98,7 @@ outf = open(outfile, "w") if not sysconfig.python_build: outf.write("#!%s%s\n" % - (os.path.normpath(sys.executable), + (self.executable, post_interp)) else: outf.write("#!%s%s\n" %
