changeset 41854:7a1433e90482

inno: stop shipping pywin32 Ancient versions of Mercurial relied on pywin32 and I suspect that's why we have this dependency. We also ship the "keyring" package, which has a dependency on "pywin32-ctypes" (providing the "win32ctypes" package). This is a stripped down version of pywin32 that doesn't have as many dependencies. Since we don't have a dependency on pywin32 and since pywin32 is a bit annoying to package, let's get rid of it. With this change, py2exe no longers picks up DLL dependencies on various UCRT DLLs (because we no longer have a .pyd file beloning to pywin32 which was pulling them in). So, we were able to remove code in support of the UCRT DLLs. .. bc:: The Windows Inno installers no longer ship the pywin32 package. This package was being bundled for historical reasons. Mercurial stopped using pywin32 several years ago and the disappearance of this package should not have any meaningful impact. Differential Revision: https://phab.mercurial-scm.org/D6067
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 03 Mar 2019 15:53:27 -0800
parents d7dc4ac1ff84
children 2dbdb9abcc4b
files contrib/packaging/inno/build.py contrib/packaging/inno/readme.rst contrib/packaging/inno/requirements.txt contrib/packaging/inno/requirements.txt.in setup.py
diffstat 5 files changed, 3 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/packaging/inno/build.py	Sun Mar 03 18:19:07 2019 -0800
+++ b/contrib/packaging/inno/build.py	Sun Mar 03 15:53:27 2019 -0800
@@ -124,20 +124,6 @@
     if py_version != 2:
         raise Exception('Only Python 2 is currently supported')
 
-    # Some extensions may require DLLs from the Universal C Runtime (UCRT).
-    # These are typically not in PATH and py2exe will have trouble finding
-    # them. We find the Windows 10 SDK and the UCRT files within.
-    sdk_path = (pathlib.Path(os.environ['ProgramFiles(x86)']) /
-                'Windows Kits' / '10' / 'Redist' / 'ucrt' / 'DLLs')
-
-    if vc_x64:
-        sdk_path = sdk_path / 'x64'
-    else:
-        sdk_path = sdk_path / 'x86'
-
-    if not sdk_path.is_dir():
-        raise Exception('UCRT files could not be found at %s' % sdk_path)
-
     build_dir.mkdir(exist_ok=True)
 
     gettext_pkg = download_entry(DOWNLOADS['gettext'], build_dir)
@@ -196,11 +182,6 @@
                            env=env,
                            check=True)
 
-        if str(sdk_path) not in os.environ['PATH'].split(os.pathsep):
-            print('adding %s to PATH' % sdk_path)
-            env['PATH'] = '%s%s%s' % (
-                os.environ['PATH'], os.pathsep, str(sdk_path))
-
         # Register location of msgfmt and other binaries.
         env['PATH'] = '%s%s%s' % (
             env['PATH'], os.pathsep, str(gettext_root / 'bin'))
--- a/contrib/packaging/inno/readme.rst	Sun Mar 03 18:19:07 2019 -0800
+++ b/contrib/packaging/inno/readme.rst	Sun Mar 03 15:53:27 2019 -0800
@@ -8,9 +8,6 @@
 * Python 2.7 (download from https://www.python.org/downloads/)
 * Microsoft Visual C++ Compiler for Python 2.7
   (https://www.microsoft.com/en-us/download/details.aspx?id=44266)
-* Windows 10 SDK (download from
-  https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
-  or install via a modern version of Visual Studio)
 * Inno Setup (http://jrsoftware.org/isdl.php) version 5.4 or newer.
   Be sure to install the optional Inno Setup Preprocessor feature,
   which is required.
--- a/contrib/packaging/inno/requirements.txt	Sun Mar 03 18:19:07 2019 -0800
+++ b/contrib/packaging/inno/requirements.txt	Sun Mar 03 15:53:27 2019 -0800
@@ -32,15 +32,6 @@
     --hash=sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942 \
     --hash=sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98 \
     # via keyring
-pywin32==224 \
-    --hash=sha256:22e218832a54ed206452c8f3ca9eff07ef327f8e597569a4c2828be5eaa09a77 \
-    --hash=sha256:32b37abafbfeddb0fe718008d6aada5a71efa2874f068bee1f9e703983dcc49a \
-    --hash=sha256:35451edb44162d2f603b5b18bd427bc88fcbc74849eaa7a7e7cfe0f507e5c0c8 \
-    --hash=sha256:4eda2e1e50faa706ff8226195b84fbcbd542b08c842a9b15e303589f85bfb41c \
-    --hash=sha256:5f265d72588806e134c8e1ede8561739071626ea4cc25c12d526aa7b82416ae5 \
-    --hash=sha256:6852ceac5fdd7a146b570655c37d9eacd520ed1eaeec051ff41c6fc94243d8bf \
-    --hash=sha256:6dbc4219fe45ece6a0cc6baafe0105604fdee551b5e876dc475d3955b77190ec \
-    --hash=sha256:9bd07746ce7f2198021a9fa187fa80df7b221ec5e4c234ab6f00ea355a3baf99
 urllib3==1.24.1 \
     --hash=sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39 \
     --hash=sha256:de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22 \
--- a/contrib/packaging/inno/requirements.txt.in	Sun Mar 03 18:19:07 2019 -0800
+++ b/contrib/packaging/inno/requirements.txt.in	Sun Mar 03 15:53:27 2019 -0800
@@ -2,4 +2,3 @@
 dulwich
 keyring
 pygments
-pywin32
--- a/setup.py	Sun Mar 03 18:19:07 2019 -0800
+++ b/setup.py	Sun Mar 03 15:53:27 2019 -0800
@@ -1286,9 +1286,9 @@
         pass
 
     try:
-        import pywintypes
-        pywintypes.TRUE
-        py2exepackages.append('pywintypes')
+        import win32ctypes
+        win32ctypes.__version__
+        py2exepackages.append('win32ctypes')
     except ImportError:
         pass
 
@@ -1372,14 +1372,6 @@
       options={
           'py2exe': {
               'packages': py2exepackages,
-              'dll_excludes': [
-                  'api-ms-win-core-apiquery-l1-1-0.dll',
-                  'api-ms-win-core-delayload-l1-1-0.dll',
-                  'api-ms-win-core-delayload-l1-1-1.dll',
-                  'api-ms-win-core-heap-l2-1-0.dll',
-                  'api-ms-win-core-libraryloader-l1-2-0.dll',
-                  'api-ms-win-core-registry-l1-1-0.dll',
-              ]
           },
           'bdist_mpkg': {
               'zipdist': False,