Use a SPDX expression for project.license - #40
Merged
Merged
Conversation
setuptools warns that the table form of project.license is deprecated and needs to be a SPDX string by 2027-Feb-18. Switch to the PEP 639 form, which means license = "MIT", an explicit license-files entry to keep shipping the LICENSE file, and dropping the now superseded license classifier, setuptools errors if both are given. SPDX license expressions need setuptools 77.0.3 or newer, so bump the build requirement. The built wheel now has Metadata-Version 2.4 with License-Expression: MIT and License-File: LICENSE, and builds with no deprecation warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow up to #39. The build warns:
Moves to the PEP 639 form:
license = "MIT"instead of the{file = "LICENSE"}tablelicense-files = ["LICENSE"]so the LICENSE file is still shipped, the table form was doing that implicitlyLicense :: OSI Approved :: MIT Licenseclassifier, setuptools raises an error if a license expression and a license classifier are both givensetuptools >= 77.0.3, which is where SPDX expression support landedThe built wheel now has
Metadata-Version: 2.4,License-Expression: MITandLicense-File: LICENSE, with no deprecation warnings andtwine checkpassing on the wheel and sdist.Two notes on the toolchain. Uploading Metadata 2.4 needs twine 6.1 or newer, the publish workflow installs the latest twine so it is fine. And setuptools 77 needs Python 3.9+ to build, which does not change the
requires-python = ">=3.8"floor for installing.