diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-12-11 22:48:44 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-12-11 22:48:44 (GMT) |
commit | 8bfba84ff24a07db053d9e354c0233f18f811fb0 (patch) | |
tree | ff855422aa61dafb9a82de3e159523b85cdb1488 /Tools | |
parent | 0f6373c34f5c0881d6ab2329aea5bce742789b20 (diff) | |
parent | b227227cb574a7bad6ed6d5cfc3ef23b10b1919f (diff) | |
download | cpython-8bfba84ff24a07db053d9e354c0233f18f811fb0.zip cpython-8bfba84ff24a07db053d9e354c0233f18f811fb0.tar.gz cpython-8bfba84ff24a07db053d9e354c0233f18f811fb0.tar.bz2 |
Issue #28783: Replaces bdist_wininst in nuget packages with stub
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/msi/distutils.command.__init__.py | 32 | ||||
-rw-r--r-- | Tools/msi/distutils.command.bdist_wininst.py | 20 | ||||
-rw-r--r-- | Tools/msi/make_zip.py | 8 |
3 files changed, 22 insertions, 38 deletions
diff --git a/Tools/msi/distutils.command.__init__.py b/Tools/msi/distutils.command.__init__.py deleted file mode 100644 index 83f34b4..0000000 --- a/Tools/msi/distutils.command.__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -"""distutils.command - -Package containing implementation of all the standard Distutils -commands.""" - -__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 - ] diff --git a/Tools/msi/distutils.command.bdist_wininst.py b/Tools/msi/distutils.command.bdist_wininst.py new file mode 100644 index 0000000..d586e34 --- /dev/null +++ b/Tools/msi/distutils.command.bdist_wininst.py @@ -0,0 +1,20 @@ +"""distutils.command.bdist_wininst + +Suppresses 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" + + 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 index 09f6fe3..8dbe83e 100644 --- a/Tools/msi/make_zip.py +++ b/Tools/msi/make_zip.py @@ -79,10 +79,6 @@ def include_in_lib(p): 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 @@ def main(): 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)) |