From d1afae2b52f6a80304b9aaba60dc967533de3b9c Mon Sep 17 00:00:00 2001 From: Chris Grady <17553614+cgfixit@users.noreply.github.com> Date: Sat, 12 Sep 2026 09:24:18 -0400 Subject: [PATCH] fix: use SPDX license expression so setuptools 77+ can build Drop the superseded Trove license classifier that modern setuptools rejects next to license = "MIT", and require setuptools>=77 for SPDX. The standalone Ruff pip-cache teardown was already fixed on main (#37). Closes #38 --- pyproject.toml | 3 +-- tests/test_pyproject_metadata.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tests/test_pyproject_metadata.py diff --git a/pyproject.toml b/pyproject.toml index b3ff3d2..1059969 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=68.0", "wheel"] +requires = ["setuptools>=77.0", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -15,7 +15,6 @@ authors = [ classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: System Administrators", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.12", diff --git a/tests/test_pyproject_metadata.py b/tests/test_pyproject_metadata.py new file mode 100644 index 0000000..8d9e3ef --- /dev/null +++ b/tests/test_pyproject_metadata.py @@ -0,0 +1,14 @@ +"""Packaging metadata: SPDX license expression, no superseded classifier.""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent +PYPROJECT = (ROOT / "pyproject.toml").read_text(encoding="utf-8") + + +def test_pyproject_uses_spdx_license_expression_not_classifier() -> None: + assert 'license = "MIT"' in PYPROJECT + assert "License :: OSI Approved :: MIT License" not in PYPROJECT + assert "setuptools>=77" in PYPROJECT