Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hook for humanize to collect package metadata #122

Merged
merged 1 commit into from
May 27, 2021

Conversation

nicoddemus
Copy link
Contributor

@nicoddemus nicoddemus commented May 26, 2021

Taken from jmoiron/humanize#105 (comment), credits go to @2press. 馃憤

Copy link
Member

@bwoodsend bwoodsend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was in the midst of saying you've got a linter to appease but you beat me to it!

As a side note - as of pyinstaller/pyinstaller#5830 (i.e. the next release of PyInstaller) metadata collection should be automatic so there shouldn't be so many of these include the metadata hooks in future...

@nicoddemus
Copy link
Contributor Author

nicoddemus commented May 26, 2021

As a side note - as of pyinstaller/pyinstaller#5830 (i.e. the next release of PyInstaller) metadata collection should be automatic so there shouldn't be so many of these include the metadata hooks in future...

Great news, thanks for the info. 馃憤

Do you know if that will also work for setuptools entry points? This would make pytest plugins (for example) work out of the box, which would be neat.

@bwoodsend
Copy link
Member

bwoodsend commented May 26, 2021

Do you know if that will also work for setuptools entry points? This would make pytest plugins (for example) work out of the box, which would be neat.

No, I did consider doing entry points too but pussied out because I was worried that it would become a clutter magnet. Libraries such as NumPy for example reference pytest and therefore import numpy would imply include all pytest's plugins. We can batten down the hatches a bit by manually labeling NumPy as not dependent on pytest but it doesn't work too well.

There is a relatively new hook utility collect_entry_point() which I added to allow users to opt in to collecting plugins. Funnily enough, streamlining pytest plugin collection was exactly what I wrote it for.

@nicoddemus
Copy link
Contributor Author

There is a relatively new hook utility collect_entry_point() which I added to allow users to opt in to collecting plugins. Funnily enough, streamlining pytest plugin collection was exactly what I wrote it for.

Great info, thanks. I will have to try that to replace the workarounds we had to do at work in order to freeze pytest + plugins. Awesome work! 馃憤

@bwoodsend
Copy link
Member

bwoodsend commented May 27, 2021

I see pyinstaller/pyinstaller#5830 is to blame for that test failure. I better go mop that up before someone accidentally releases it...

@bwoodsend bwoodsend merged commit 807f346 into pyinstaller:master May 27, 2021
crwood added a commit to gridsync/gridsync that referenced this pull request Jun 28, 2021
This hook is no longer necessary as of 077552e, since version "2021.2"
of the "pyinstaller-hooks-contrib" package now includes also it. See
pyinstaller/pyinstaller-hooks-contrib#122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants