From: Marc-André Lemburg Date: Tue, 11 Dec 2001 20:44:42 +0000 (+0000) Subject: Joe VanAndel wrote: X-Git-Tag: v2.2.1c1~419 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90294d01be806a96f5196143e4d9ea10a6064965;p=python 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. --- diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index 7286bf1f3f..bfa33c3a10 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -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" %