-
Notifications
You must be signed in to change notification settings - Fork 57
feat: use PEP 639 where possible #592
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
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
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.
Pull Request Overview
This PR updates backend dependency versions and metadata handling to improve support for PEP 639. Key changes include bumping required versions for several build backends (pdm, hatch, setuptools, flit, pybind11, skbuild), modifying conditional logic for license assignment in the project configuration, and updating documentation and noxfile checks related to license metadata.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
{{cookiecutter.project_name}}/pyproject.toml | Updated dependency version constraints and adjusted license condition |
pyproject.toml | Minor stylistic update to the license field formatting |
noxfile.py | Added license metadata verification with potential unpacking issue |
docs/_includes/pyproject.md | Revised documentation to reflect updated license metadata practices |
Comments suppressed due to low confidence (1)
noxfile.py:286
- Unpacking a generator expression into a single variable may raise a ValueError if the generator yields zero or more than one element. Consider collecting the matches into a list and validating that exactly one match was found before proceeding.
(metadata_path,) = (n for n in names if n.endswith("PKG-INFO") and "egg-info" not in n)
{%- if cookiecutter.backend not in ['poetry', 'mesonpy', 'maturin'] %} | ||
{%- if cookiecutter.license == "BSD" %} | ||
license = "BSD-3-Clause" | ||
{%- elif cookiecutter.license == "Apache" %} | ||
license = "Apache-2.0" | ||
{%- elif cookiecutter.license == "MIT" %} |
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.
Review the updated conditional for including the license field to ensure that excluding 'poetry', 'mesonpy', and 'maturin' aligns with the intended metadata configuration for these backends.
{%- if cookiecutter.backend not in ['poetry', 'mesonpy', 'maturin'] %} | |
{%- if cookiecutter.license == "BSD" %} | |
license = "BSD-3-Clause" | |
{%- elif cookiecutter.license == "Apache" %} | |
license = "Apache-2.0" | |
{%- elif cookiecutter.license == "MIT" %} | |
{%- if cookiecutter.license == "BSD" %} | |
{%- if cookiecutter.backend == "mesonpy" %} | |
license.file = "LICENSE" | |
{%- else %} | |
license = "BSD-3-Clause" | |
{%- endif %} | |
{%- elif cookiecutter.license == "Apache" %} | |
{%- if cookiecutter.backend == "mesonpy" %} | |
license.file = "LICENSE" | |
{%- else %} | |
license = "Apache-2.0" | |
{%- endif %} | |
{%- elif cookiecutter.license == "MIT" %} | |
{%- if cookiecutter.backend == "mesonpy" %} | |
license.file = "LICENSE" | |
{%- else %} |
Copilot uses AI. Check for mistakes.
Supported:
hatchling>=1.26
flit-core>=1.11
pdm-backend>=2.4
setuptools>=77
scikit-build-core>=0.12
Currently the only backends that haven't supported this yet:
Close #589.