-
-
Notifications
You must be signed in to change notification settings - Fork 506
Switch to uv_build
build system & cleanup
#2848
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
Conversation
* Switched `hatchling` -> `uv_build` * Removed useless `twine check` from `build-and-check` CI job
Similar to Such as Diffs: https://gist.github.com/intgr/dd8c503bc93148eef1f1e8632fff850e |
@@ -1,7 +1,3 @@ | |||
[build-system] | |||
requires = ["hatchling"] | |||
build-backend = "hatchling.build" |
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 never liked that this was at the top of the file; moved to below package metadata.
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.
We can also lean on https://github.com/tox-dev/pyproject-fmt/ for a consistent sort
[tool.hatch.build] | ||
packages = ["django_stubs_ext"] | ||
[build-system] | ||
requires = ["uv_build>=0.8.22,<0.9.0"] |
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.
Do we need to be this specific? Will "uv_build>=0.8"
work?
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 recommended by official docs https://docs.astral.sh/uv/concepts/build-backend/#using-the-uv-build-backend
I guess patchlevel versions may contain fixes, I see no reason to allow downgrading to more buggy versions given that we haven't tested with them.
uv build ext/ | ||
- name: Check package metadata | ||
run: | | ||
uvx twine check --strict dist/* |
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.
Does uv
has an alternative with a dry-run?
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.
See #2846 (comment) - twine check
is only making sure that rST is valid in the long description, but we're using markdown.
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, seem good to me
Solving follow-ups from #2846 comments.
hatchling
->uv_build
twine check
frombuild-and-check
CI job