bpo-42802: Remove distutils bdist_wininst command (GH-24043)

The distutils bdist_wininst command deprecated in Python 3.8 has been
removed. The distutils bidst_wheel command is now recommended to
distribute binary packages on Windows.

* Remove Lib/distutils/command/bdist_wininst.py
* Remove PC/bdist_wininst/ project
* Remove Lib/distutils/command/wininst-*.exe programs
* Remove all references to bdist_wininst
This commit is contained in:
Victor Stinner 2021-01-09 00:35:01 +01:00 committed by GitHub
parent 68e1f259be
commit 0e2a0f72cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 17 additions and 4057 deletions

View file

@ -33,9 +33,6 @@ from .support.pip import *
from .support.props import *
from .support.nuspec import *
BDIST_WININST_FILES_ONLY = FileNameSet("wininst-*", "bdist_wininst.py")
BDIST_WININST_STUB = "PC/layout/support/distutils.command.bdist_wininst.py"
TEST_PYDS_ONLY = FileStemSet("xxlimited", "xxlimited_35", "_ctypes_test", "_test*")
TEST_DIRS_ONLY = FileNameSet("test", "tests")
@ -100,17 +97,11 @@ def get_lib_layout(ns):
else:
if f in TCLTK_FILES_ONLY:
return ns.include_tcltk
if f in BDIST_WININST_FILES_ONLY:
return ns.include_bdist_wininst
return True
for dest, src in rglob(ns.source / "Lib", "**/*", _c):
yield dest, src
if not ns.include_bdist_wininst:
src = ns.source / BDIST_WININST_STUB
yield Path("distutils/command/bdist_wininst.py"), src
def get_tcltk_lib(ns):
if not ns.include_tcltk:

View file

@ -1,25 +0,0 @@
"""distutils.command.bdist_wininst
Suppress the 'bdist_wininst' command, while still allowing
setuptools to import it without breaking."""
from distutils.core import Command
from distutils.errors import DistutilsPlatformError
class bdist_wininst(Command):
description = "create an executable installer for MS Windows"
# Marker for tests that we have the unsupported bdist_wininst
_unsupported = True
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
raise DistutilsPlatformError(
"bdist_wininst is not supported in this Python distribution"
)

View file

@ -26,7 +26,6 @@ OPTIONS = {
"venv": {"help": "venv"},
"dev": {"help": "headers and libs"},
"symbols": {"help": "symbols"},
"bdist-wininst": {"help": "bdist_wininst support"},
"underpth": {"help": "a python._pth file", "not-in-all": True},
"launchers": {"help": "specific launchers"},
"appxmanifest": {"help": "an appxmanifest"},
@ -81,7 +80,6 @@ PRESETS = {
"venv",
"dev",
"symbols",
"bdist-wininst",
"chm",
],
},