Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/command/build_scripts.py @ 16846:2d2ee30f43ea legacy-trunk
Leave #! lines featuring /usr/bin/env alone
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Wed, 28 Feb 2001 20:59:33 +0000 |
| parents | 7acb8bbc215b |
| children | a1b3446c720f |
line wrap: on
line diff
--- a/Lib/distutils/command/build_scripts.py Wed Feb 28 20:58:04 2001 +0000 +++ b/Lib/distutils/command/build_scripts.py Wed Feb 28 20:59:33 2001 +0000 @@ -10,8 +10,10 @@ from distutils.core import Command from distutils.dep_util import newer -# check if Python is called on the first line with this expression -first_line_re = re.compile(r'^#!.*python(\s+.*)?') +# check if Python is called on the first line with this expression. +# This expression will leave lines using /usr/bin/env alone; presumably +# the script author knew what they were doing...) +first_line_re = re.compile(r'^#!(?!\s*/usr/bin/env\b).*python(\s+.*)?') class build_scripts (Command):
