From: Gustavo Niemeyer Date: Fri, 27 Jun 2003 19:33:38 +0000 (+0000) Subject: Do not add extra "\n" after bang line. X-Git-Tag: v2.3c1~302 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6cf26195c6e206cba1bb3ebe554e82ab52304bd5;p=thirdparty%2FPython%2Fcpython.git Do not add extra "\n" after bang line. --- diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index f61ad37d03c8..8de9cd3f6d9c 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -15,7 +15,7 @@ from distutils.util import convert_path from distutils import log # check if Python is called on the first line with this expression -first_line_re = re.compile(r'^#!.*python[0-9.]*(\s+.*)?$') +first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') class build_scripts (Command): @@ -96,7 +96,7 @@ class build_scripts (Command): (os.path.normpath(sys.executable), post_interp)) else: - outf.write("#!%s%s" % + outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), "python" + sysconfig.get_config_var("EXE")),