-
Notifications
You must be signed in to change notification settings - Fork 402
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
Modernize the build: switch to hatchling #1142
Conversation
- generate the version from vcs metadata (tags) - use hatchling as a build system
hatch-vcs needs this
264c345
to
a93f9f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @offbyone. I put some topics to discuss. Also would be nice if we have something mentioning on CONTRIBUTING.rst about the new tool and how to manually package/publish the application after this change.
Hatchling is really minimal; your development tools for dependency management basically become "pip" more or less intentionally. That's part of the appeal to me; it lets each developer decide how to manage virtualenvs, tools, etc (me, for example, I use direnv, and poetry just interferese with those) |
Please don't use the VCS integration. This has caused tonnes of headaches for gitlint. |
Fair enough! I've found it really nice to work with over in PyHamcrest, but ymmv, and it's your project :D How do you prefer to handle dev versions? One of the reasons I landed on hatch.vcs is because it solved the versioning problem for me when working on the next release really painlessly. What version would you like me to put into this? |
73090d6
to
02de427
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @offbyone! For approval I would just want to release 4.0.0, to do a release and then add this one as following version. Any problem @sigmavirus24 ?
I don't follow why this would be a major version bump in the package; there should be no user-facing changes from this PR. My inclination would be to not change the version at all, from this. |
4.0 was planned for already. But I almost want to include this for 4.0 because distro packagers are going to throw a fit probably |
ce76198
to
46286be
Compare
It looks like GHA still thinks it needs to run the test suite with 3.10. If I had to guess I'd say that's a leftover from the original revision of the PR, since it's not in the workflow any more. |
Lgtm. I dont have permissions to change required checks though. |
@sigmavirus24 @offbyone I wasn't lucky publishing it with hatch. Opened an upstream issue pypa/hatch#833 |
@sigmavirus24 I'm starting to think that my proposal to use hatch was a mistake based on the many, many packaging edge cases we've encountered along the way. |
To be clear the issue for which you are working around is that PEP 625 standardizes the naming of source distributions and PyPI doesn't acknowledge that so modern tools like There is nothing more that can be done and as far as I can tell everything is now working. |
generate the version from vcs metadata (tags)This is per our discussion in email; I'm not sure this is the way you want to
take things, but here's a pivot to hatchling to build.
The main takeaways here are very low configuration building, and versioning from
tags. Actual usage is pretty conventional:
pip install -e .[dev]
gets you tox, wheel, and the test dependencies.pip install -e .[test]
gets you pytest and the various testing dependenciestox
just workspython -mbuild
generates an sdisttwine
is provided for publication