diff Lib/distutils/command/build_scripts.py @ 63136:29a3eda89995

reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
author Tarek Ziadé <ziade.tarek@gmail.com>
date Thu, 22 Jul 2010 12:50:05 +0000
parents 5aa90248a99f
children 6ad356525381
line wrap: on
line diff
--- a/Lib/distutils/command/build_scripts.py	Thu Jul 22 07:40:56 2010 +0000
+++ b/Lib/distutils/command/build_scripts.py	Thu Jul 22 12:50:05 2010 +0000
@@ -6,6 +6,7 @@
 
 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, Mixin2to3
@@ -56,7 +57,6 @@
         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 = []
         updated_files = []
@@ -96,16 +96,16 @@
                 updated_files.append(outfile)
                 if not self.dry_run:
                     outf = open(outfile, "w")
-                    if not _sysconfig.is_python_build():
+                    if not sysconfig.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()