Skip to content

Commit

Permalink
Merge pull request #3531 from pypa/bugfix/3525-error
Browse files Browse the repository at this point in the history
Remove code reliant on bdist_wininst
  • Loading branch information
jaraco authored Jun 21, 2023
2 parents 7a72d55 + 0e3c5bf commit 90bbf31
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions newsfragments/3525.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed code referencing bdist_wininst in install_scripts.
9 changes: 0 additions & 9 deletions setuptools/command/install_scripts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from distutils import log
import distutils.command.install_scripts as orig
from distutils.errors import DistutilsModuleError
import os
import sys

Expand Down Expand Up @@ -37,15 +36,7 @@ def _install_ep_scripts(self):
)
bs_cmd = self.get_finalized_command('build_scripts')
exec_param = getattr(bs_cmd, 'executable', None)
try:
bw_cmd = self.get_finalized_command("bdist_wininst")
is_wininst = getattr(bw_cmd, '_is_running', False)
except (ImportError, DistutilsModuleError):
is_wininst = False
writer = ei.ScriptWriter
if is_wininst:
exec_param = "python.exe"
writer = ei.WindowsScriptWriter
if exec_param == sys.executable:
# In case the path to the Python executable contains a space, wrap
# it so it's not split up.
Expand Down

0 comments on commit 90bbf31

Please sign in to comment.