D6093: setup: properly install build_hgextindex for py2exe builds
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Mar 8 13:50:01 EST 2019
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
Because the hgbuild class has a private copy of build.sub_commands,
modifying build.sub_commands from this code effectively resulted
in a no-op. Registering the sub-command on hgbuild actually results
in the sub-command running when building Mercurial.
diff --git a/setup.py b/setup.py
@@ -1262,8 +1262,10 @@
'copyright':'Copyright (C) 2005-2019 Matt Mackall and others',
- # sub command of 'build' because 'py2exe' does not handle sub_commands
- build.sub_commands.insert(0, ('build_hgextindex', None))
+ # Sub command of 'build' because 'py2exe' does not handle sub_commands.
+ # Need to override hgbuild because it has a private copy of
+ # build.sub_commands.
+ hgbuild.sub_commands.insert(0, ('build_hgextindex', None))
# put dlls in sub directory so that they won't pollute PATH
extra['zipfile'] = 'lib/library.zip'
To: indygreg, #hg-reviewers
More information about the Mercurial-devel