Commit 5d17586a authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #1986 from vstinner/skip_wininst

Fix install_scripts() if bdist_wininst is missing
parents 54b76e63 b0ecd44b
Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9).
...@@ -32,8 +32,11 @@ class install_scripts(orig.install_scripts): ...@@ -32,8 +32,11 @@ class install_scripts(orig.install_scripts):
) )
bs_cmd = self.get_finalized_command('build_scripts') bs_cmd = self.get_finalized_command('build_scripts')
exec_param = getattr(bs_cmd, 'executable', None) exec_param = getattr(bs_cmd, 'executable', None)
try:
bw_cmd = self.get_finalized_command("bdist_wininst") bw_cmd = self.get_finalized_command("bdist_wininst")
is_wininst = getattr(bw_cmd, '_is_running', False) is_wininst = getattr(bw_cmd, '_is_running', False)
except ImportError:
is_wininst = False
writer = ei.ScriptWriter writer = ei.ScriptWriter
if is_wininst: if is_wininst:
exec_param = "python.exe" exec_param = "python.exe"
......
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