-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set up standard Python packaging #57
base: main
Are you sure you want to change the base?
Conversation
Just a short comment. @Chroxvi is on vacation and is back in two weeks. I really want him to do the review. Sorry for letting you wait until he is back. |
Gentle nudge (as I too am back from vacation) :) |
@akx Thanks a lot for this contribution - and sorry for not getting back to you any sooner. I definitely agree that we need a proper modern packaging setup for cotainr. Actually, I was working on something very similar in main...pip_package, but got distracted by other tasks before I managed to finish it up. My goal was to not only have a proper packaging setup, but also to have an automatic pipeline for building wheels and publishing them on PyPi. I am happy, though, to start with just merging a proper packaging setup, and then revisiting the PyPi publishing in another PR. Since you work in this PR is almost identical to what I was trying out in main...pip_package, we need to consolidate those two branches into a single approach to this. I don't have much experience with all the different available Python packaging tools, nor any strong opinion about specific tools to use. I chose to base my work on "flit" since it seems to be the simplest way to build pure Python packages. Would you recommend "hatchling" and "build" over "flit"? If so, why? Also do you have any other valuable insights that we should consider when implementing this Python packing setup? |
Story of my life! 😂
You'll be glad to hear that PyPI publishing is practically trivial to add on top of this; a CI step like this would automagically publish to PyPI when a tag is pushed.
I prefer Hatch (its build backend being
Well, for one, I would heavily consider getting rid of the explicit |
Rebased post #56 btw. |
This PR sets up modern standard Python packaging using Hatch's Hatchling build backend.
Major changes are:
pyproject.toml
filecotainr
now has a standard console script entrypoint, sobin/cotainr
is no longer technically neededtest
,docs
) are now specified in thepyproject.toml
file (so installable viapip install -e .[test,docs]
)This makes Cotainr installable and available directly via e.g.
(or a built wheel – there's a GHA workflow for that too):
Please see akx#1 for CI results in my fork.