[Python-checkins] cpython (3.6): Issue #28783: Replaces bdist_wininst in nuget packages with stub

ned.deily python-checkins at python.org
Fri Dec 16 02:44:40 EST 2016


https://hg.python.org/cpython/rev/1f69fb337288
changeset: 105657:1f69fb337288
branch: 3.6
user: Steve Dower <steve.dower at microsoft.com>
date: Sun Dec 11 14:48:32 2016 -0800
summary:
 Issue #28783: Replaces bdist_wininst in nuget packages with stub
files:
 Tools/msi/distutils.command.bdist_wininst.py | 48 +++------
 Tools/msi/make_zip.py | 8 +-
 2 files changed, 20 insertions(+), 36 deletions(-)
diff --git a/Tools/msi/distutils.command.__init__.py b/Tools/msi/distutils.command.bdist_wininst.py
rename from Tools/msi/distutils.command.__init__.py
rename to Tools/msi/distutils.command.bdist_wininst.py
--- a/Tools/msi/distutils.command.__init__.py
+++ b/Tools/msi/distutils.command.bdist_wininst.py
@@ -1,32 +1,20 @@
-"""distutils.command
+"""distutils.command.bdist_wininst
 
-Package containing implementation of all the standard Distutils
-commands."""
+Suppresses the 'bdist_wininst' command, while still allowing
+setuptools to import it without breaking."""
 
-__all__ = ['build',
- 'build_py',
- 'build_ext',
- 'build_clib',
- 'build_scripts',
- 'clean',
- 'install',
- 'install_lib',
- 'install_headers',
- 'install_scripts',
- 'install_data',
- 'sdist',
- 'register',
- 'bdist',
- 'bdist_dumb',
- 'bdist_rpm',
- # This command is not included in this package
- #'bdist_wininst',
- 'check',
- 'upload',
- # These two are reserved for future use:
- #'bdist_sdux',
- #'bdist_pkgtool',
- # Note:
- # bdist_packager is not included because it only provides
- # an abstract base class
- ]
+from distutils.core import Command
+from distutils.errors import DistutilsPlatformError
+
+class bdist_wininst(Command):
+ description = "create an executable installer for MS Windows"
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ raise DistutilsPlatformError("bdist_wininst is not supported "
+ "in this Python distribution")
diff --git a/Tools/msi/make_zip.py b/Tools/msi/make_zip.py
--- a/Tools/msi/make_zip.py
+++ b/Tools/msi/make_zip.py
@@ -79,10 +79,6 @@
 if name in EXCLUDE_FILE_FROM_LIBRARY:
 return False
 
- # Special code is included below to patch this file back in
- if [d.lower() for d in p.parts[-3:]] == ['distutils', 'command', '__init__.py']:
- return False
-
 suffix = p.suffix.lower()
 return suffix not in {'.pyc', '.pyo', '.exe'}
 
@@ -218,8 +214,8 @@
 extra_files = []
 if s == 'Lib' and p == '**/*':
 extra_files.append((
- source / 'tools' / 'msi' / 'distutils.command.__init__.py',
- Path('distutils') / 'command' / '__init__.py'
+ source / 'tools' / 'msi' / 'distutils.command.bdist_wininst.py',
+ Path('distutils') / 'command' / 'bdist_wininst.py'
 ))
 copied = copy_to_layout(temp / t.rstrip('/'), chain(files, extra_files))
 print('Copied {} files'.format(copied))
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /