D6135: packaging: don't bundle DLLs in py2exe library.zip for x86 builds

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Mar 15 01:39:47 UTC 2019


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I had ported the x86/x64 behavior difference from the Inno
  Setup installer files. Why things were this way, I'm not sure.
  
  The WiX configuration files are expecting to have standalone
  DLL files for both configurations. And the 32-bit WiX installers
  were broken due to missing DLLs.
  
  Let's standardize on standalone DLL files on all configurations
  for consistency. I /think/ this will be faster, as I /think/
  py2exe binaries would have to extract the DLL to a temporary file
  in order to load it. But I'm not 100% sure about that.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6135

AFFECTED FILES
  contrib/packaging/hgpackaging/py2exe.py
  contrib/packaging/inno/mercurial.iss
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1364,6 +1364,7 @@
       distclass=hgdist,
       options={
           'py2exe': {
+              'bundle_files': 3,
               'dll_excludes': py2exedllexcludes,
               'excludes': py2exeexcludes,
               'packages': py2exepackages,
diff --git a/contrib/packaging/inno/mercurial.iss b/contrib/packaging/inno/mercurial.iss
--- a/contrib/packaging/inno/mercurial.iss
+++ b/contrib/packaging/inno/mercurial.iss
@@ -71,10 +71,8 @@
 Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
 Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
 Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
-#if ARCH == "x64"
 Source: dist\lib\*.dll; Destdir: {app}\lib
 Source: dist\lib\*.pyd; Destdir: {app}\lib
-#endif
 Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist
 Source: dist\msvc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
 Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
diff --git a/contrib/packaging/hgpackaging/py2exe.py b/contrib/packaging/hgpackaging/py2exe.py
--- a/contrib/packaging/hgpackaging/py2exe.py
+++ b/contrib/packaging/hgpackaging/py2exe.py
@@ -128,7 +128,7 @@
     print('building Mercurial')
     subprocess.run(
         [str(venv_python), 'setup.py',
-         'py2exe', '-b', '3' if vc_x64 else '2',
+         'py2exe',
          'build_doc', '--html'],
         cwd=str(source_dir),
         env=env,



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list