From 7193ea962a051071ba817488526ab12b36cc5494 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Tue, 26 Nov 2024 00:45:52 +0100 Subject: [PATCH] Adjust pyproject.toml to force setuptools to emit valid metadata 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. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 91d7d483..c4d08b7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ twine = "twine.__main__:main" [tool.setuptools] packages = ["twine", "twine.commands"] include-package-data = true -license-files = ["LICENSE"] +license-files = [] [tool.setuptools_scm]