-
Notifications
You must be signed in to change notification settings - Fork 24
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
Introduce "hatch" to build & release #435
Conversation
b73d0de
to
14170f9
Compare
7659cdb
to
9fa2145
Compare
Nice! I was about to suggest trying hatch publish -r test but can't add you to the project (no verified primary email) Edit: ran the command successfully 🙂 |
@@ -100,3 +100,6 @@ addopts = "--doctest-modules --ignore=setup.py --ignore=tasks.py --ignore=docs/ | |||
|
|||
[tool.hatch.version] | |||
path = "simpleflow/__init__.py" | |||
|
|||
[tool.hatch.build] | |||
include = ["/simpleflow"] |
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.
Maybe we need an exclude
rule; if you look at the artefacts I published on test.pypi.org, there are *.pyi~
files that were loitering around
script/release
Outdated
@@ -18,13 +18,29 @@ VERSION_FILE = "simpleflow/__init__.py" | |||
MAIN_BRANCH = "main" | |||
CHANGELOG_FILE = "CHANGELOG.md" | |||
|
|||
# This is not the full list, we removed some abbreviations that are not super explicit. | |||
# Hatch does not expose does as constants, so we have to duplicate them here. |
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.
# Hatch does not expose does as constants, so we have to duplicate them here. | |
# Hatch does not expose them as constants, so we have to duplicate them here. |
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.
(I think he meant "those", but "them" works too)
👋 Hi @jbbarth 🙂 I had forgotten about this branch and redid one using |
With this addition, only the "simpleflow" directory will be included in generated eggs/wheels.
Signed-off-by: Yves Bastide <[email protected]>
Update to the last versions supporting Python 3.7 Signed-off-by: Yves Bastide <[email protected]>
Signed-off-by: Yves Bastide <[email protected]>
I managed yet again to push a broken rc 🙄; let's use your work |
Description
This PR introduces the "hatch" library to build eggs/wheels, publish, increment versions. It works a lot better (imho) than setuptools so we should use it 🚀
Details
I was polluted on my computer by weird behaviours (probably related to my PYTHONPATH pyenv setup, previously installed simpleflow, etc. etc.). So I tested on a docker containers, see below.
Installing from git (first commit)
Basically this is enough:
Test:
=> we can import simpleflow
=> no extra directory (default config of hatchling is nice!)
=> we have the subdirectories
Building an egg or wheel (second commit)
We need to add this so the resulting tarball egg (tar.gz) or wheel (whl) only contain the "simpleflow" folder.
Test:
=> we get simpleflow installed, with no extra directory.
Releasing (third commit)
I adapted the "script/release" script and tested the best I could, but didn't get to the "publish" step yet. I'm curious @ybastide if this could work for you: the version now doesn't preview an automated increment, but you can provide a specific version or rely on hatch goodies to update the number you want ("minor", "patch", etc.).
I think it will work. If you're OK with the rest I can test further of course.