Skip to content

Commit

Permalink
Adjust pyproject.toml to force setuptools to emit valid metadata
Browse files Browse the repository at this point in the history
When any of the glob patterns specified in the provisional field
"license-files" in the "tool.setuptools" section in pyproject.toml
matches a file in the package, Setuptools emits a License-File
metadata entry. However, Setuptools sets the Metadata-Version to 2.1.

With the implementation of PEP 639 and metadata version 2.4, this
combination is now invalid and is rejected by packaging, and thus by
PyPI.

Reset tools.setuptools.license-files to do not match any file. This
prevents invalid metadata to be generated.
  • Loading branch information
dnicolodi committed Nov 26, 2024
1 parent af9b12b commit d40245d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ packages = [
"twine.commands",
]
include-package-data = true
license-files = ["LICENSE"]
license-files = []

[tool.setuptools_scm]

Expand Down

0 comments on commit d40245d

Please sign in to comment.