diff options
author | Michael W. Hudson <mwh@python.net> | 2001-12-10 16:15:44 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2001-12-10 16:15:44 (GMT) |
commit | fb173cd471e842dc37f01e767dd1fe0a9a5f7d4e (patch) | |
tree | 2978a576dd7c17ffa680b33dad64f880cf51e95c /Lib/distutils/command | |
parent | 52306a780b622ebe90f80f4296a311e6921d274a (diff) | |
download | cpython-fb173cd471e842dc37f01e767dd1fe0a9a5f7d4e.zip cpython-fb173cd471e842dc37f01e767dd1fe0a9a5f7d4e.tar.gz cpython-fb173cd471e842dc37f01e767dd1fe0a9a5f7d4e.tar.bz2 |
Fix for
[ #409430 ] pydoc install broken
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/build_scripts.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index 31750b7..7286bf1 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -7,6 +7,7 @@ Implements the Distutils 'build_scripts' command.""" __revision__ = "$Id$" import sys, os, re +from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path @@ -86,8 +87,16 @@ class build_scripts (Command): (script, self.build_dir)) if not self.dry_run: outf = open(outfile, "w") - outf.write("#!%s%s\n" % - (os.path.normpath(sys.executable), post_interp)) + if not sysconfig.python_build: + outf.write("#!%s%s\n" % + (os.path.normpath(sys.executable), + post_interp)) + else: + outf.write("#!%s%s" % + (os.path.join( + sysconfig.get_config_var("BINDIR"), + "python" + sysconfig.get_config_var("EXE")), + post_interp)) outf.writelines(f.readlines()) outf.close() if f: |