setup: properly install build_hgextindex for py2exe builds
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.
Differential Revision: https://phab.mercurial-scm.org/D6093
setup: configure py2exe config via environment variables
The Inno Setup and WiX installers ship a different set of packages
with py2exe builds. And there are multiple WiX installer variants
(e.g. TortoiseHG).
Since there are multiple variants of py2exe configs and they
can be defined by entities not in our repository, let's
provide a mechanism for setup.py to supplement behavior via
environment variables. This is slighly less hacky than a setup.cfg
file IMO since the caller doesn't need to worry about mutating
global state of the source directory.
Differential Revision: https://phab.mercurial-scm.org/D6092