From 0bdadd6cf21dac01896fc6d23a0983ac143696e5 Mon Sep 17 00:00:00 2001 From: Chris Marchbanks Date: Wed, 28 May 2025 18:52:10 -0600 Subject: [PATCH] Use License Expressions in pyproject.toml With the release of PEP-639 the best practice for specifying the license is now to use a license expression in the license field and specify any license files in license-files rather than the table-based approach from PEP-621. Including the license in the classifiers is also no longer allowed when using PEP-639 and has been removed. Signed-off-by: Chris Marchbanks --- pyproject.toml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5305e38b..b50119ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools>=77.0.0"] build-backend = "setuptools.build_meta" [project] @@ -7,7 +7,11 @@ name = "prometheus_client" version = "0.22.0" description = "Python client for the Prometheus monitoring system." readme = "README.md" -license = { file = "LICENSE" } +license = "Apache-2.0 AND BSD-2-Clause" +license-files = [ + "LICENSE", + "NOTICE", +] requires-python = ">=3.9" authors = [ { name = "The Prometheus Authors", email = "prometheus-developers@googlegroups.com" }, @@ -33,7 +37,6 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Monitoring", - "License :: OSI Approved :: Apache Software License", ] [project.optional-dependencies]