-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setuptools.command.bdist_wininst may crash if distutils.command.bdist_wininst is missing #857
Comments
I'm willing to make and verify any fix here, but I'll need a bit of guidance. I can see that So my guess is that we really ought to handle |
Adding handling for try:
bs_cmd = self.get_finalized_command('build_scripts')
except ImportError:
bs_cmd = None
exec_param = getattr(bs_cmd, 'executable', None)
try:
bw_cmd = self.get_finalized_command("bdist_wininst")
except ImportError:
bw_cmd = None I'm a little surprised that |
Alternatively, adding this to try:
import distutils.command.bdist_wininst as orig
except ImportError:
from distutils.core import Command
from distutils.errors import DistutilsModuleError
class bdist_wininst(Command):
def initialize_options(self): pass
def finalize_options(self): pass
def run(self):
raise DistutilsModuleError("bdist_wininst is not supported in this distribution")
else:
class bdist_wininst(orig.bdist_wininst):
... |
I've fixed this in the CPython nuget packages instead, so they once again have |
@zooba: Should we not update setuptools to deprecate this command (issuing a warning when it is available and used) and prepare to remove support for it entirely in a future, backward-incompatible release? |
I am totally okay with dropping support for bdist_wininst. It would be great if we had a UI-based installer for |
In the new Python Nuget packages,
bdist_wininst
is omitted (because, you know, stop making wininst installers). However, because setuptools tries to import it unconditionally, when it is missing, you get a stack like this:The text was updated successfully, but these errors were encountered: