2 Lib/distutils/command/build_scripts.py | 43 +++------------------------------
3 1 file changed, 4 insertions(+), 39 deletions(-)
5 --- Python-2.6.4.orig/Lib/distutils/command/build_scripts.py
6 +++ Python-2.6.4/Lib/distutils/command/build_scripts.py
7 @@ -54,10 +54,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 self.mkpath(self.build_dir)
19 @@ -80,41 +77,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.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':