Skip to content

Conversation

@sjvrijn
Copy link
Contributor

@sjvrijn sjvrijn commented Dec 9, 2025

Checklist before requesting a review

  • I have read the contribution guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All user facing changes have been added to CHANGELOG.md

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
    This would be technically be breaking for anyone using build tools that don't support PEP 639, although I don't expect it to be an actual problem.

List of related issues or pull requests**

Refs:

Describe the changes made in this pull request

pyproject.toml:

  • Removed license classifier from the classifiers list (no longer supported in new format, and wasn't properly configured anyway 🙈)
  • Added license-files key, with NOTICE only appearing for Apache license
  • Updated license key to specify SPDX identifier of selected license, omit key if license is "Other"

MANIFEST.in:

  • Only include NOTICE for Apache license

Instructions to review the pull request

Install the requirements

<install uv>
cd $(mktemp -d --tmpdir py-tmpl-XXXXXX)

Create a new package using the template, selecting the various license options

uvx copier copy \
    https://github.com/nlesc/python-template test_package \
    --vcs-ref pep-639

TIP: after filling it in for the first time, save the .copier-answers.yml file somewhere else, remove the line with the license answer, and specify it as the --data-file, so you only have to answer the license question in future iterations:

uvx copier copy \
    https://github.com/nlesc/python-template test_package \
    --vcs-ref pep-639 \
    --data-file .copier-answers.yml

Check that pyproject.toml and MANIFEST.in are rendered correctly/nicely

# Create a local environment to test your generated package locally
cd test_package
less pyproject.toml
less MANIFEST.in
uvx --from build pyproject-build --installer uv

# go back to folder in /tmp, clear generated package and try again with a new license option
# cd .. && rm -rf test_package

@sjvrijn sjvrijn requested review from OleMussmann, bouweandela, f-hafner and fdiblen and removed request for fdiblen December 9, 2025 01:22
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.

2 participants