-
-
Notifications
You must be signed in to change notification settings - Fork 63
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace setuptools with hatchling #79
Conversation
Codecov Report
@@ Coverage Diff @@
## main #79 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 9 9
Lines 742 742
=======================================
Hits 735 735
Misses 7 7
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
The coverage drop indicates translations aren't tested. These files are not in Git and are generated by
With setuptools they're included in the distribution files by
But Hatchling doesn't use We probably need something like this in [tool.hatch.build.force-include]
"em/emojis.json" = "em/emojis.json" https://hatch.pypa.io/latest/config/build/#forced-inclusion But I'd like to avoid listing all the files manually, so we don't need to add new ones when a new translation is added. |
What's the motivation for switching to hatch from setuptools?
Looks like hatch supports pattern matching. And probably include (not force-include) is sufficient because these files are inside the module. |
Well first of all, I'd like to move away from setuptools which is getting a bit old (or " Hatchling is standards compliant, and specifically built based on the new packaging standards for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631). And I've seen a lot of interest and other projects moving over, here's a few: https://hatch.pypa.io/latest/users/ (It's also the default option in this PyPA tutorial https://packaging.python.org/en/latest/tutorials/packaging-projects/.)
Thanks, I'll have a look. Possibly also as artifacts. |
2023b48
to
0792c15
Compare
Updated to include translations as artifacts: [tool.hatch.build]
artifacts = [
"*.mo",
] https://hatch.pypa.io/latest/config/build/#artifacts Note: this was accidentally already included in #90 (and had no effect there), and so not shown in this PR's diff: [tool.hatch]
version.source = "vcs" |
Will release with #90 first, then merge this and it can go in the next release. Edit: https://github.com/python-humanize/humanize/releases/tag/4.5.0 released. |
Changes proposed in this pull request:
.mo
files as artifactssetup.py
(setup.cfg
was deleted in Replace setup.cfg with pyproject.toml #90)