Commit 46a82989 authored by Jason R. Coombs's avatar Jason R. Coombs

Use API for loading the CLI launcher for Windows from setuptools (currently unreleased).

parent 11571375
......@@ -1104,7 +1104,11 @@ def _create_script(contents, dest):
if win32_exe.endswith('-script'):
win32_exe = win32_exe[:-7] # remove "-script"
win32_exe = win32_exe + '.exe' # add ".exe"
new_data = pkg_resources.resource_string('setuptools', 'cli.exe')
try:
new_data = setuptools.command.easy_install.get_win_launcher('cli')
except AttributeError:
# fall back for compatibility with older Distribute versions
new_data = pkg_resources.resource_string('setuptools', 'cli.exe')
if (not os.path.exists(win32_exe) or
(open(win32_exe, 'rb').read() != new_data)
):
......
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