Patchwork D8758: extensions: make `hg help extensions` list disabled extensions with PyOxidizer

login
register
mail settings
Submitter phabricator
Date July 16, 2020, 5:57 a.m.
Message ID <differential-rev-PHID-DREV-xuhoojzwrkietrod4elf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46759/
State Superseded
Headers show

Comments

phabricator - July 16, 2020, 5:57 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  `setup.py` has a mechanism for generating a list of bundled extensions
  and their documenation and putting it in a `hgext/__index__.py`
  file. That file is then read from `extensions.py`, which makes `hg
  help extensions` work in py2exe binaries. This patch makes it so
  `setup.py` produces the `hgext/__index__.py` file also when called by
  PyOxidizer.
  
  Thanks to Matt Harbison for pointing out the existence of
  `__index__.py`!

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1695,6 +1695,9 @@ 
     if dllexcludes:
         py2exedllexcludes.extend(dllexcludes.split(' '))
 
+if os.environ.get('PYOXIDIZER'):
+    hgbuild.sub_commands.insert(0, ('build_hgextindex', None))
+
 if os.name == 'nt':
     # Windows binary file versions for exe/dll files must have the
     # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535