-
Notifications
You must be signed in to change notification settings - Fork 274
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
move from setuptools to hatch #1258
Conversation
Thanks for this :-)
You probably can try releasing on test PyPI
Whatever works, I think. I don't think I'm using zest releaser myself anyway. |
902beb8
to
e51715e
Compare
e51715e
to
0752611
Compare
MANIFEST.in
Outdated
@@ -1,3 +0,0 @@ | |||
include *.rst |
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.
MANIFEST.in was used for setuptools, it is not needed anymore with hatch
5cea431
to
9036f39
Compare
pyproject.toml
Outdated
packages = ["ihatemoney"] | ||
[tool.hatch.build.hooks.custom] | ||
dependencies = [ | ||
"Babel>=2.10.1" |
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.
This is the oldest babel python I could find that would support all the python versions supported by ihatemoney.
python 3.10 support has been brought with babel 2.10, using babel<2.10 would have broke minversions tests for python 3.10+
ea08717
to
07fa938
Compare
@@ -14,9 +14,7 @@ CONTRIBUTORS | |||
docker-compose.* | |||
Dockerfile | |||
docs | |||
LICENSE |
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.
LICENSE
and README.md
needs to be included in the Docker image, because hatch needs those files to build the package.
I think this should be mostly OK now.
I could upload to testpypi with Anyway, I could test installation with BTW I created the /cc @zorun |
6ae61f1
to
3f89b4e
Compare
I've updated the python babel version to be compatible with python 3.12. See python-babel/babel#1033 |
@zorun, are you happy with this? |
No strong opinion on hatch itself, I don't know much about it, I just hope it's a long-term project. Just a small thing to consider (sorry if this has been addressed), why do you specify a dependency on Babel here instead of in pyproject.toml? If it's something specific and you really need it, please add a comment. About making releases, we should definitely have a robust, reproducible and unique way to do them. Currently we are using zest (through What do you think? If you are confident about that, I'm OK to see it merged after the Babel comment is addressed, and let's discuss/change the release process as a second step. |
7cbdb49
to
a7b03d5
Compare
Indeed, there is always a risk. What reassures me is that hatch seems active, and it looks OK in comparison with the concurrence: (Source: https://framapiaf.org/@fcodvpt/111533565837454708)
There is an explicit dependency to Babel at build time, because it is needed to dynamically compile translations catalogs and put them into the package. I added a comment. |
Ok, thanks, it looks good then! I just merged some translation updates, can you rebase one last time? Then I will disable .mo generation on weblate. |
packages are built with hatch instead of setuptools. Translations catalogs are compiled at package build time, and before unit tests are ran. Thus there is no need to keep them versioned in git anymore.
a7b03d5
to
fcd1c64
Compare
Thanks! @zorun I'm myself still doing manual releases, but having these automated seems a good goal 👍 |
It looks like something is failing with Python 3.12: https://github.com/spiral-project/ihatemoney/actions/runs/7203079881/job/19622368172 |
@azmeuk also, can you add me to the package on test.pypi.org? |
Tests were passing on this branch. The reported 3.12 error seems related to babel < 2.13.1 ( |
I'm |
You are invited too! |
Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>
With this PR:
hatch build
pytest
is still functional in the development environmenthatch_build.py
)babel_catalogs
automatic fixture)make serve
(with a Makefile target dependency)If zest.releaser is actually not compatible with hatch, we could drop zest.releaser and use hatch for pypi package publication.
fixes #1238