-
-
Notifications
You must be signed in to change notification settings - Fork 485
Switch to pyproject.toml + PEP621 #2688
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
Funding = "https://github.com/sponsors/typeddjango" | ||
"Release notes" = "https://github.com/typeddjango/django-stubs/releases" | ||
|
||
[tool.hatch.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.
Nit: Sort tool block alphabetically, i.e. move after [tool.codespell]
?
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 kinda want to keep it close to the rest of the package metadata since it's use to build. No strong feeling tho
Also wondering if we could replace |
I think this should be in a separate pr and we might have to consider UV too for that. This pr currently doesn't use hatch but only the hatchling build backend |
Ah, yes, got muddled by the
If you're considering uv instead, then have you thought about the uv build backend instead of hatchling? |
let's please not replace |
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.
One last question: right now our build-and-check-metadata
uses different flags from the final release
django-stubs/.github/workflows/test.yml
Lines 170 to 171 in 81321eb
python3 -m build --sdist --wheel . | |
python3 -m build --sdist --wheel ext/ |
Is it ok? Or should we adjust python -m build
flags?
I tested running
|
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 everyone! |
Fixes #1570
Fixes #2641
This revives and update #1570 allowing us to use PEP621 and remove the
SETUPTOOLS_ENABLE_FEATURES=legacy-editable
we had to use and that broke ci recently.The
pyproject.toml
was intially generated usinghatch new --init
and tweaked to keep existing ordering / comments.I've checked what differs between the pypi current dist and what is build here and found the following differences:
tests
folders ( which is good ?)django_stubs.egg-info
folder in the sdist distribution which I believe is expected since it's a setuptools artifactTest plan
python -m build ext/ && python -m build
pip install -r ./requirements.txt
&& run the whole ci locally