Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e2a0f7

Browse files
authored
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
1 parent 68e1f25 commit 0e2a0f7

40 files changed

+17
-4057
lines changed

Doc/distutils/apiref.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,11 +1862,6 @@ Subclasses of :class:`Command` must define the following methods.
18621862

18631863
.. _Windows Installer: https://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx
18641864

1865-
In most cases, the ``bdist_msi`` installer is a better choice than the
1866-
``bdist_wininst`` installer, because it provides better support for
1867-
Win64 platforms, allows administrators to perform non-interactive
1868-
installations, and allows installation through group policies.
1869-
18701865

18711866
:mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a Redhat RPM and SRPM
18721867
===========================================================================================
@@ -1878,19 +1873,6 @@ Subclasses of :class:`Command` must define the following methods.
18781873
.. % todo
18791874
18801875
1881-
:mod:`distutils.command.bdist_wininst` --- Build a Windows installer
1882-
====================================================================
1883-
1884-
.. module:: distutils.command.bdist_wininst
1885-
:synopsis: Build a Windows installer
1886-
1887-
.. deprecated:: 3.8
1888-
Use bdist_wheel (wheel packages) instead.
1889-
1890-
1891-
.. % todo
1892-
1893-
18941876
:mod:`distutils.command.sdist` --- Build a source distribution
18951877
==============================================================
18961878

Doc/distutils/builtdist.rst

Lines changed: 2 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ The available formats for built distributions are:
9696
+-------------+------------------------------+---------+
9797
| ``sdux`` | HP-UX :program:`swinstall` | |
9898
+-------------+------------------------------+---------+
99-
| ``wininst`` | self-extracting ZIP file for | \(4) |
100-
| | Windows | |
101-
+-------------+------------------------------+---------+
10299
| ``msi`` | Microsoft Installer. | |
103100
+-------------+------------------------------+---------+
104101

@@ -141,14 +138,9 @@ generated by each, are:
141138
+--------------------------+-------------------------------------+
142139
| :command:`bdist_rpm` | rpm, srpm |
143140
+--------------------------+-------------------------------------+
144-
| :command:`bdist_wininst` | wininst |
145-
+--------------------------+-------------------------------------+
146141
| :command:`bdist_msi` | msi |
147142
+--------------------------+-------------------------------------+
148143

149-
.. note::
150-
bdist_wininst is deprecated since Python 3.8.
151-
152144
.. note::
153145
bdist_msi is deprecated since Python 3.9.
154146

@@ -190,8 +182,7 @@ The former allows you to specify RPM-specific options; the latter allows you to
190182
easily specify multiple formats in one run. If you need to do both, you can
191183
explicitly specify multiple :command:`bdist_\*` commands and their options::
192184

193-
python setup.py bdist_rpm --packager="John Doe <[email protected]>" \
194-
bdist_wininst --target-version="2.0"
185+
python setup.py bdist_rpm --packager="John Doe <[email protected]>"
195186

196187
Creating RPM packages is driven by a :file:`.spec` file, much as using the
197188
Distutils is driven by the setup script. To make your life easier, the
@@ -299,61 +290,6 @@ file winds up deep in the "build tree," in a temporary directory created by
299290
.. % to the \file{.spec} file.)
300291
301292
302-
.. _creating-wininst:
303-
304-
Creating Windows Installers
305-
===========================
306-
307-
.. warning::
308-
bdist_wininst is deprecated since Python 3.8.
309-
310-
.. warning::
311-
bdist_msi is deprecated since Python 3.9.
312-
313-
Executable installers are the natural format for binary distributions on
314-
Windows. They display a nice graphical user interface, display some information
315-
about the module distribution to be installed taken from the metadata in the
316-
setup script, let the user select a few options, and start or cancel the
317-
installation.
318-
319-
Since the metadata is taken from the setup script, creating Windows installers
320-
is usually as easy as running::
321-
322-
python setup.py bdist_wininst
323-
324-
or the :command:`bdist` command with the :option:`!--formats` option::
325-
326-
python setup.py bdist --formats=wininst
327-
328-
If you have a pure module distribution (only containing pure Python modules and
329-
packages), the resulting installer will be version independent and have a name
330-
like :file:`foo-1.0.win32.exe`. Note that creating ``wininst`` binary
331-
distributions in only supported on Windows systems.
332-
333-
If you have a non-pure distribution, the extensions can only be created on a
334-
Windows platform, and will be Python version dependent. The installer filename
335-
will reflect this and now has the form :file:`foo-1.0.win32-py2.0.exe`. You
336-
have to create a separate installer for every Python version you want to
337-
support.
338-
339-
The installer will try to compile pure modules into :term:`bytecode` after installation
340-
on the target system in normal and optimizing mode. If you don't want this to
341-
happen for some reason, you can run the :command:`bdist_wininst` command with
342-
the :option:`!--no-target-compile` and/or the :option:`!--no-target-optimize`
343-
option.
344-
345-
By default the installer will display the cool "Python Powered" logo when it is
346-
run, but you can also supply your own 152x261 bitmap which must be a Windows
347-
:file:`.bmp` file with the :option:`!--bitmap` option.
348-
349-
The installer will also display a large title on the desktop background window
350-
when it is run, which is constructed from the name of your distribution and the
351-
version number. This can be changed to another text by using the
352-
:option:`!--title` option.
353-
354-
The installer file will be written to the "distribution directory" --- normally
355-
:file:`dist/`, but customizable with the :option:`!--dist-dir` option.
356-
357293
.. _cross-compile-windows:
358294

359295
Cross-compiling on Windows
@@ -370,10 +306,7 @@ For example, on a 32bit version of Windows, you could execute::
370306

371307
python setup.py build --plat-name=win-amd64
372308

373-
to build a 64bit version of your extension. The Windows Installers also
374-
support this option, so the command::
375-
376-
python setup.py build --plat-name=win-amd64 bdist_wininst
309+
to build a 64bit version of your extension.
377310

378311
would create a 64bit installation executable on your 32bit version of Windows.
379312

@@ -462,18 +395,3 @@ built-in functions in the installation script.
462395
and *iconindex* is the index of the icon in the file *iconpath*. Again, for
463396
details consult the Microsoft documentation for the :class:`IShellLink`
464397
interface.
465-
466-
467-
Vista User Access Control (UAC)
468-
===============================
469-
470-
Starting with Python 2.6, bdist_wininst supports a :option:`!--user-access-control`
471-
option. The default is 'none' (meaning no UAC handling is done), and other
472-
valid values are 'auto' (meaning prompt for UAC elevation if Python was
473-
installed for all users) and 'force' (meaning always prompt for elevation).
474-
475-
.. note::
476-
bdist_wininst is deprecated since Python 3.8.
477-
478-
.. note::
479-
bdist_msi is deprecated since Python 3.9.

Doc/distutils/commandref.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,5 @@ anything except backslash or colon.
101101
.. % \subsection{\protect\command{bdist}}
102102
.. % \subsection{\protect\command{bdist\_dumb}}
103103
.. % \subsection{\protect\command{bdist\_rpm}}
104-
.. % \subsection{\protect\command{bdist\_wininst}}
105104
106105

Doc/distutils/introduction.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,6 @@ the setup script. The difference is which Distutils *commands* they use: the
112112
:command:`install` is more often for installers (although most developers will
113113
want to install their own code occasionally).
114114

115-
If you want to make things really easy for your users, you can create one or
116-
more built distributions for them. For instance, if you are running on a
117-
Windows machine, and want to make things easy for other Windows users, you can
118-
create an executable installer (the most appropriate type of built distribution
119-
for this platform) with the :command:`bdist_wininst` command. For example::
120-
121-
python setup.py bdist_wininst
122-
123-
will create an executable installer, :file:`foo-1.0.win32.exe`, in the current
124-
directory.
125-
126115
Other useful built distribution formats are RPM, implemented by the
127116
:command:`bdist_rpm` command, Solaris :program:`pkgtool`
128117
(:command:`bdist_pkgtool`), and HP-UX :program:`swinstall`

Doc/extending/building.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,5 @@ If the source distribution has been built successfully, maintainers can also
162162
create binary distributions. Depending on the platform, one of the following
163163
commands can be used to do so. ::
164164

165-
python setup.py bdist_wininst
166165
python setup.py bdist_rpm
167166
python setup.py bdist_dumb

Doc/whatsnew/3.10.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ by :func:`curses.color_content`, :func:`curses.init_color`,
236236
support is provided by the underlying ncurses library.
237237
(Contributed by Jeffrey Kintscher and Hans Petter Jansson in :issue:`36982`.)
238238

239+
distutils
240+
---------
241+
242+
The ``bdist_wininst`` command deprecated in Python 3.8 has been removed.
243+
The ``bidst_wheel`` command is now recommended to distribute binary packages
244+
on Windows.
245+
(Contributed by Victor Stinner in :issue:`42802`.)
246+
239247
doctest
240248
-------
241249

Lib/distutils/command/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
'bdist',
2020
'bdist_dumb',
2121
'bdist_rpm',
22-
'bdist_wininst',
2322
'check',
2423
'upload',
2524
# These two are reserved for future use:

Lib/distutils/command/bdist.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class bdist(Command):
6262

6363
# Establish the preferred order (for the --help-formats option).
6464
format_commands = ['rpm', 'gztar', 'bztar', 'xztar', 'ztar', 'tar',
65-
'wininst', 'zip', 'msi']
65+
'zip', 'msi']
6666

6767
# And the real information.
6868
format_command = {'rpm': ('bdist_rpm', "RPM distribution"),
@@ -71,8 +71,6 @@ class bdist(Command):
7171
'xztar': ('bdist_dumb', "xz'ed tar file"),
7272
'ztar': ('bdist_dumb', "compressed tar file"),
7373
'tar': ('bdist_dumb', "tar file"),
74-
'wininst': ('bdist_wininst',
75-
"Windows executable installer"),
7674
'zip': ('bdist_dumb', "ZIP file"),
7775
'msi': ('bdist_msi', "Microsoft Installer")
7876
}

Lib/distutils/command/bdist_msi.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Copyright (C) 2005, 2006 Martin von Löwis
22
# Licensed to PSF under a Contributor Agreement.
3-
# The bdist_wininst command proper
4-
# based on bdist_wininst
53
"""
64
Implements the bdist_msi command.
75
"""

0 commit comments

Comments
 (0)