[Python-checkins] CVS: python/dist/src/Lib/distutils/command build_scripts.py,1.6,1.7

A.M. Kuchling akuchling@users.sourceforge.net
Wed, 28 Feb 2001 12:59:35 -0800


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv20637

Modified Files:
	build_scripts.py 
Log Message:
Leave #! lines featuring /usr/bin/env alone


Index: build_scripts.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_scripts.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** build_scripts.py	2000/09/30 18:27:54	1.6
--- build_scripts.py	2001/02/28 20:59:33	1.7
***************
*** 11,16 ****
  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+.*)?')
  
  class build_scripts (Command):
--- 11,18 ----
  from distutils.dep_util import newer
  
! # 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):