Commit 19a52913 authored by Jason R. Coombs's avatar Jason R. Coombs

Merged in grizzlynyo/setuptools/bdist_wininst_gui_scripts (pull request #160)

fix an issue for bdist_wininst with gui_scripts:
parents aa8a6c90 864de11c
......@@ -2138,10 +2138,13 @@ class WindowsScriptWriter(ScriptWriter):
pattern, repl = repl, pattern
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
return orig_header
if sys.platform == 'win32':
from distutils.spawn import find_executable
clean_header = new_header[2:-1].strip('"')
if not find_executable(clean_header):
# the adjusted version doesn't exist, so return the original
return orig_header
return new_header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment