[Distutils] python scripts installed with bad first line

M.-A. Lemburg mal@lemburg.com
Tue Dec 11 15:48:00 2001


Thanks, I've checked in a similar patch. 

BTW, please upload bug reports like these to the SF. That way
they won't get lost.

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.
> 
> Here's a patch to avoid this behavior:
> diff -c build_scripts.py.orig build_scripts.py
> *** build_scripts.py.orig       Tue Dec 11 10:07:45 2001
> --- build_scripts.py    Tue Dec 11 10:19:08 2001
> ***************
> *** 81,86 ****
> --- 81,88 ----
>                   if match:
>                       adjust = 1
>                       post_interp = match.group(1)
> +                     if not post_interp:
> +                         post_interp = ''
> 
>               if adjust:
>                   self.announce("copying and adjusting %s -> %s" %
> 
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> http://mail.python.org/mailman/listinfo/distutils-sig

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/