Skip to content

Commit 5d17586

Browse files
authored
Merge pull request #1986 from vstinner/skip_wininst
Fix install_scripts() if bdist_wininst is missing
2 parents 54b76e6 + b0ecd44 commit 5d17586

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎changelog.d/1985.change.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9).

‎setuptools/command/install_scripts.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ def run(self):
3232
)
3333
bs_cmd = self.get_finalized_command('build_scripts')
3434
exec_param = getattr(bs_cmd, 'executable', None)
35-
bw_cmd = self.get_finalized_command("bdist_wininst")
36-
is_wininst = getattr(bw_cmd, '_is_running', False)
35+
try:
36+
bw_cmd = self.get_finalized_command("bdist_wininst")
37+
is_wininst = getattr(bw_cmd, '_is_running', False)
38+
except ImportError:
39+
is_wininst = False
3740
writer = ei.ScriptWriter
3841
if is_wininst:
3942
exec_param = "python.exe"

0 commit comments

Comments
 (0)