From 5c2058fbe5625bf19b0ad2d7ee017a8148927f0e Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 31 Jul 2025 12:39:57 +0200 Subject: [PATCH] PEP 639 license information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Declare licenses using keys `license` and `license-files`, as per PEP 639: * license: SPDX license expression * license-files: list of license file glob patterns 2. Keep the Trove classifier in an attempt to remain compatible with tools that do not support PEP 639 yet, such as pip-licenses. Hopefully the build system will not complain about the redundant/obsolete classifier. In theory, maturin ≥ 1.9 supports PEP 639, which means the proper licensing metadata should be included in packages: https://www.maturin.rs/changelog.html In practice, maturin < 1.9.3 does not take license-files into account and the LICENSE file is therefore missing from packages. --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 438520fda7..c9cff39664 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=1.9,<2.0"] +requires = ["maturin>=1.9.3,<2.0"] build-backend = "maturin" [project] @@ -9,7 +9,8 @@ description = "An extremely fast Python linter and code formatter, written in Ru authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }] readme = "README.md" requires-python = ">=3.7" -license = { file = "LICENSE" } +license = "MIT" +license-files = ["LICENSE"] keywords = [ "automation", "flake8",