diff Lib/distutils/command/build_scripts.py @ 21355:003dc573b295 legacy-trunk

Joe VanAndel wrote: > > When using 'distutils' (shipped with Python 2.1) I've found that my > Python scripts installed with a first line of: > > #!/usr/bin/python2.1None > > This is caused by distutils trying to patch the first line of the python > script to use the current interpreter.
author Marc-André Lemburg <mal@egenix.com>
date Tue, 11 Dec 2001 20:44:42 +0000
parents 4420a4bd96a4
children 55c4d083c309
line wrap: on
line diff
--- a/Lib/distutils/command/build_scripts.py	Tue Dec 11 20:31:34 2001 +0000
+++ b/Lib/distutils/command/build_scripts.py	Tue Dec 11 20:44:42 2001 +0000
@@ -80,7 +80,7 @@
                 match = first_line_re.match(first_line)
                 if match:
                     adjust = 1
-                    post_interp = match.group(1)
+                    post_interp = match.group(1) or ''
 
             if adjust:
                 self.announce("copying and adjusting %s -> %s" %