diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-06 10:38:01 +0200 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-06 10:38:01 +0200 |
commit | a78c722a5cb3756dd0fb83badc66c50fda85c144 (patch) | |
tree | 25f80b32c5f3d27d2b02884858b8c811929104cd /setuptools/command/easy_install.py | |
parent | 6c256c7653a517912e603187111cfafc7c82d7dc (diff) | |
download | external_python_setuptools-a78c722a5cb3756dd0fb83badc66c50fda85c144.tar.gz external_python_setuptools-a78c722a5cb3756dd0fb83badc66c50fda85c144.tar.bz2 external_python_setuptools-a78c722a5cb3756dd0fb83badc66c50fda85c144.zip |
Use a pattern object to invoke the substitution in _adjust_header, restoring Python 2.4-2.6 compatibility.
--HG--
extra : rebase_source : 4245d65731ca4433c80cf260906085500ab6c357
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b1838024..f82125d6 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1862,8 +1862,8 @@ class WindowsScriptWriter(ScriptWriter): repl = 'python.exe' if type_ == 'gui': pattern, repl = repl, pattern - new_header = re.sub(string=orig_header, pattern=re.escape(pattern), - repl=repl, flags=re.IGNORECASE) + pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) + new_header = pattern_ob.sub(string=orig_header, repl=repl) clean_header = new_header[2:-1].strip('"') if sys.platform == 'win32' and not os.path.exists(clean_header): # the adjusted version doesn't exist, so return the original |