]> granicus.if.org Git - python/commitdiff
bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 1 Jul 2019 12:54:19 +0000 (05:54 -0700)
committerGitHub <noreply@github.com>
Mon, 1 Jul 2019 12:54:19 +0000 (05:54 -0700)
bdist_wininst depends on MBCS codec, unavailable on non-Windows,
and bdist_wininst have not worked since at least Python 3.2, possibly
never on Python 3.

Here we document that bdist_wininst is only supported on Windows,
and we mark it unsupported otherwise to skip tests.

Distributors of Python 3 can now safely drop the bdist_wininst .exe files
without the need to skip bdist_wininst related tests.
(cherry picked from commit 72cd653c4ed7a4f8f8fb06ac364b08a97085a2b5)

Co-authored-by: Miro HronĨok <miro@hroncok.cz>
Doc/distutils/builtdist.rst
Lib/distutils/command/bdist_wininst.py
Misc/NEWS.d/next/Windows/2019-07-01-12-38-48.bpo-10945.s0YBHG.rst [new file with mode: 0644]

index f44d0d039f45f4036a7f10e8dbbd1d73b622a129..8c65d9d591188bc38e3c1f0d3a4d666a2b92dbe0 100644 (file)
@@ -315,8 +315,8 @@ or the :command:`bdist` command with the :option:`!--formats` option::
 
 If you have a pure module distribution (only containing pure Python modules and
 packages), the resulting installer will be version independent and have a name
-like :file:`foo-1.0.win32.exe`.  These installers can even be created on Unix
-platforms or Mac OS X.
+like :file:`foo-1.0.win32.exe`. Note that creating ``wininst`` binary
+distributions in only supported on Windows systems.
 
 If you have a non-pure distribution, the extensions can only be created on a
 Windows platform, and will be Python version dependent. The installer filename
index 3a616883bee58f1a8d8120b96c509b8e277594a6..acaa184b5f7113792b8858295793ae6b6caf7031 100644 (file)
@@ -55,6 +55,9 @@ class bdist_wininst(Command):
     boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize',
                        'skip-build']
 
+    # bpo-10945: bdist_wininst requires mbcs encoding only available on Windows
+    _unsupported = (sys.platform != "win32")
+
     def initialize_options(self):
         self.bdist_dir = None
         self.plat_name = None
diff --git a/Misc/NEWS.d/next/Windows/2019-07-01-12-38-48.bpo-10945.s0YBHG.rst b/Misc/NEWS.d/next/Windows/2019-07-01-12-38-48.bpo-10945.s0YBHG.rst
new file mode 100644 (file)
index 0000000..d395765
--- /dev/null
@@ -0,0 +1,2 @@
+Officially drop support for creating bdist_wininst installers on non-Windows
+systems.