Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb173cd

Browse files
author
Michael W. Hudson
committed
Fix for
[ #409430 ] pydoc install broken
1 parent 52306a7 commit fb173cd

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

Lib/distutils/command/build_scripts.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
__revision__ = "$Id$"
88

99
import sys, os, re
10+
from distutils import sysconfig
1011
from distutils.core import Command
1112
from distutils.dep_util import newer
1213
from distutils.util import convert_path
@@ -86,8 +87,16 @@ def copy_scripts (self):
8687
(script, self.build_dir))
8788
if not self.dry_run:
8889
outf = open(outfile, "w")
89-
outf.write("#!%s%s\n" %
90-
(os.path.normpath(sys.executable), post_interp))
90+
if not sysconfig.python_build:
91+
outf.write("#!%s%s\n" %
92+
(os.path.normpath(sys.executable),
93+
post_interp))
94+
else:
95+
outf.write("#!%s%s" %
96+
(os.path.join(
97+
sysconfig.get_config_var("BINDIR"),
98+
"python" + sysconfig.get_config_var("EXE")),
99+
post_interp))
91100
outf.writelines(f.readlines())
92101
outf.close()
93102
if f:

0 commit comments

Comments
 (0)