contrib: extract the hgext index generation from setup.py
This puts __index__.pyc
in library.zip
like before. , but for some reason hg help -e relink
doesn't print a summary like it did before the setup.py changes. Still investigating. I also need to look at what PyOxidizer is doing, but I happened to have an old one installed (6.6.1) on my system, and it doesn't have an hgext/__index__
at all.
It also stops printing an error for displaying the help of a disabled extension with py2exe packaging, which has been broken since 5.4. Modern PyOxidizer builds aren't affected, since the *.py files life in the filesystem, instead of being packed in the executable itself.
Merge request reports
Activity
requested review from @mercurial.review
added 16 commits
-
59bf1c6f...e2c239da - 13 commits from branch
branch/default
- 9cc1e8fc94a6 - contrib: extract the hgext index generation from setup.py
- 5cdc7031b916 - setup: drop the unused hgext index generation
- d278a74b8c66 - extensions: relax the checks around loading disabled extension help
Toggle commit list-
59bf1c6f...e2c239da - 13 commits from branch
added 3 commits
- 41719e738761 - contrib: extract the hgext index generation from setup.py
- 43f4a8e56d4a - setup: drop the unused hgext index generation
- 53711003945d - extensions: relax the checks around loading disabled extension help
Matt Harbison summary of the situation so I stop asking about it.
In 6.9.3, index contains a dict call
docs
that is {b'ext_name': b'first_line_of_help'} It is/was only used in the case of showing disabled extension help. If the extension is enabled, it grabs the doc on the module Back in 2020, the order of processing trying to read the docstring from the *.py file vs reading from index was flipped, because somebody had generated an index locally when running tests, and the tests failed because only the summary line was printed for the help Now we're down to just py2exe using this. And it's getting confused because the extensions have a file attr, but it points to inside of library.zip, so it falls back to the index But also the hgext module has a file, so since it's trying to read disabled help, it bails out on the assumption that it should have been obtained directly from the filesystemThen the discussion took a turn were it because apparent that not only py2exe was the only user, but that it was effectively broken since 2020. So It seems like it can remains broken in 7.0 and hopefully we won't be using py2exe anymore in 7.1.
added next-cycle label