mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
taking sysconfig out of distutils
This commit is contained in:
parent
c3b0cd75b2
commit
5633a8048f
35 changed files with 1189 additions and 1006 deletions
|
@ -6,7 +6,6 @@ __revision__ = "$Id$"
|
|||
|
||||
import os, re
|
||||
from stat import ST_MODE
|
||||
from distutils import sysconfig
|
||||
from distutils.core import Command
|
||||
from distutils.dep_util import newer
|
||||
from distutils.util import convert_path
|
||||
|
@ -57,6 +56,7 @@ class build_scripts (Command):
|
|||
ie. starts with "\#!" and contains "python"), then adjust the first
|
||||
line to refer to the current Python interpreter as we copy.
|
||||
"""
|
||||
_sysconfig = __import__('sysconfig')
|
||||
self.mkpath(self.build_dir)
|
||||
outfiles = []
|
||||
for script in self.scripts:
|
||||
|
@ -94,16 +94,16 @@ class build_scripts (Command):
|
|||
self.build_dir)
|
||||
if not self.dry_run:
|
||||
outf = open(outfile, "w")
|
||||
if not sysconfig.python_build:
|
||||
if not _sysconfig.is_python_build():
|
||||
outf.write("#!%s%s\n" %
|
||||
(self.executable,
|
||||
post_interp))
|
||||
else:
|
||||
outf.write("#!%s%s\n" %
|
||||
(os.path.join(
|
||||
sysconfig.get_config_var("BINDIR"),
|
||||
"python%s%s" % (sysconfig.get_config_var("VERSION"),
|
||||
sysconfig.get_config_var("EXE"))),
|
||||
_sysconfig.get_config_var("BINDIR"),
|
||||
"python%s%s" % (_sysconfig.get_config_var("VERSION"),
|
||||
_sysconfig.get_config_var("EXE"))),
|
||||
post_interp))
|
||||
outf.writelines(f.readlines())
|
||||
outf.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue