2 Lib/distutils/command/build_scripts.py | 43 +++------------------------------
3 1 file changed, 4 insertions(+), 39 deletions(-)
5 --- a/Lib/distutils/command/build_scripts.py
6 +++ b/Lib/distutils/command/build_scripts.py
7 @@ -51,10 +51,7 @@ class build_scripts (Command):
10 def copy_scripts (self):
11 - """Copy each script listed in 'self.scripts'; if it's marked as a
12 - Python script in the Unix way (first line matches 'first_line_re',
13 - ie. starts with "\#!" and contains "python"), then adjust the first
14 - line to refer to the current Python interpreter as we copy.
15 + """Copy each script listed in 'self.scripts'
17 _sysconfig = __import__('sysconfig')
18 self.mkpath(self.build_dir)
19 @@ -78,41 +75,9 @@ class build_scripts (Command):
24 - first_line = f.readline()
26 - self.warn("%s is an empty file (skipping)" % script)
29 - match = first_line_re.match(first_line)
32 - post_interp = match.group(1) or ''
35 - log.info("copying and adjusting %s -> %s", script,
37 - if not self.dry_run:
38 - outf = open(outfile, "w")
39 - if not _sysconfig.is_python_build():
40 - outf.write("#!%s%s\n" %
44 - outf.write("#!%s%s\n" %
46 - _sysconfig.get_config_var("BINDIR"),
47 - "python%s%s" % (_sysconfig.get_config_var("VERSION"),
48 - _sysconfig.get_config_var("EXE"))),
50 - outf.writelines(f.readlines())
57 - self.copy_file(script, outfile)
60 + self.copy_file(script, outfile)
62 if os.name == 'posix':