Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/command/build_scripts.py @ 58450:fa69e891edf4 legacy-trunk
taking sysconfig out of distutils
| author | Tarek Ziadé <ziade.tarek@gmail.com> |
|---|---|
| date | Sat, 23 Jan 2010 09:23:15 +0000 |
| parents | 8dc28a126b2c |
| children | b36cb4602e21 |
line wrap: on
line diff
--- a/Lib/distutils/command/build_scripts.py Sat Jan 23 08:47:54 2010 +0000 +++ b/Lib/distutils/command/build_scripts.py Sat Jan 23 09:23:15 2010 +0000 @@ -6,7 +6,6 @@ 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 @@ 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 @@ 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()
