Skip to content

Conversation

@henryiii
Copy link
Collaborator

@henryiii henryiii commented May 2, 2025

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.

@henryiii henryiii marked this pull request as ready for review May 2, 2025 05:36
@henryiii henryiii requested a review from Copilot May 2, 2025 05:36
Copy link
Contributor

Copilot AI left a 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)

Comment on lines +69 to +74
{%- 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" %}
Copy link

Copilot AI May 2, 2025

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.

Suggested change
{%- 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.
@henryiii henryiii merged commit fe627e9 into main May 2, 2025
30 checks passed
@henryiii henryiii deleted the henryiii/feat/pep639 branch May 2, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PEP 639

2 participants