Fix license deprecation warning in pyproject.toml (#49)fix: replace table license with SPDX in pyproject.toml (#49) #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR corrects the SetuptoolsDeprecationWarning warning reported in issue #49 :
Why
As of PEP 639 (early 2025), Python packaging moved to a clearer, unambiguous license metadata format:
text
andfile
, which was inconsistent and hard for tools to validate.license = "BSD-2-Clause"
) plus alicense-files
list.Setuptools ≥ 77 now requires this new format and will warn (or error) on the old table style. This change ensures compatibility with the current Python packaging ecosystem and automatic license validation.
Changes made
license = { ... }
table from[project]
.license = "BSD-2-Clause"
andlicense-files = ["LICENSE"]
in[project]
."License :: OSI Approved :: BSD License"
(compliant with PEP 639)How to test
python -m venv env
andsource env/bin/activate
(on Linux).pip install -e .[dev]
python -m build
→ no more warnings or errorsenv/bin/python -m pytest
→ everything goes greenLinked to
Closes #49