diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2001-02-28 20:59:33 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2001-02-28 20:59:33 (GMT) |
commit | 3a95850323734c5d16c31f1d523b29c5f4f75ff9 (patch) | |
tree | 40f8aab63620cf210ddbb9963c550f84abc4acd9 | |
parent | b797f1f6d25c02d15f20f04681f39f2e75efb9b3 (diff) | |
download | cpython-3a95850323734c5d16c31f1d523b29c5f4f75ff9.zip cpython-3a95850323734c5d16c31f1d523b29c5f4f75ff9.tar.gz cpython-3a95850323734c5d16c31f1d523b29c5f4f75ff9.tar.bz2 |
Leave #! lines featuring /usr/bin/env alone
-rw-r--r-- | Lib/distutils/command/build_scripts.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index 495f4c3..1f68899 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -10,8 +10,10 @@ import sys, os, re 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): |