D7444: setup: conditionalize access to `sys.dllhandle` when building extensions

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat Nov 16 19:19:07 UTC 2019


This revision is now accepted and ready to land.
indygreg added a comment.
indygreg accepted this revision.


  This workaround is fine for PyOxidizer. But `pythonlib` and `hgpythonlib.h` and `exewrapper.c` aren't needed for PyOxidizer. So there is further room to make large parts of this code conditional on running in PyOxidizer. The path I was going in my patch was to have `setup.py` look for an environment variable that identified the current build environment as PyOxidizer and tweak behavior appropriately.
  
  I do like the approach of making this patch agnostic of PyOxidizer, as other environments could also lack a `sys.dllhandle`. And arguably the proper way to disable the building of the exe wrapper is to add an argument to our `setup.py` to control it. PyOxidizer could then pass in this argument.
  
  As for the output issues, I'm not sure what's going on. I added support for `Py_LegacyWindowsStdioFlag` to PyOxidizer a few hours ago. I'd start there. Feel free to make noise on PyOxidizer's issue tracker!

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7444/new/

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

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


More information about the Mercurial-devel mailing list