From ca91d6c6d96c7675c6b0bf2ad644fcd8e0185d0f Mon Sep 17 00:00:00 2001 From: shimwell Date: Wed, 19 Aug 2026 14:42:24 +0200 Subject: [PATCH] Use a SPDX expression for project.license 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. --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84bf8d0..9546679 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools >= 65.5.0", + "setuptools >= 77.0.3", "setuptools_scm[toml] >= 7.0.5", ] build-backend = "setuptools.build_meta" @@ -11,14 +11,14 @@ name = "openmc_data" authors = [ { name="Jonathan Shimwell", email="mail@jshimwell.com" }, ] -license = {file = "LICENSE"} +license = "MIT" +license-files = ["LICENSE"] description = "A Python package containing a collection of scripts for producing and downloading data for OpenMC" readme = "README.md" requires-python = ">=3.8" keywords = ["openmc", "nuclear", "data", "download", "process", "cross", "section"] classifiers = [ "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] dependencies = [