]> granicus.if.org Git - python/commitdiff
Joe VanAndel wrote:
authorMarc-André Lemburg <mal@egenix.com>
Tue, 11 Dec 2001 20:44:42 +0000 (20:44 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Tue, 11 Dec 2001 20:44:42 +0000 (20:44 +0000)
>
> 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.

Lib/distutils/command/build_scripts.py

index 7286bf1f3f9ec40d45692251a0b7df9d8336f5f9..bfa33c3a10ae6cc413704f58465574de3c73e5d3 100644 (file)
@@ -80,7 +80,7 @@ class build_scripts (Command):
                 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" %