From e995eef424cb996ebf933b690d30c1834b99999d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 31 Mar 2025 22:31:24 +0300 Subject: [PATCH 1/2] Replace deprecated classifier with licence expression (PEP 639) --- .ci/install.sh | 2 +- pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/install.sh b/.ci/install.sh index 62677005e..fbb6c28b5 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -50,7 +50,7 @@ if [[ $(uname) != CYGWIN* ]]; then # Pyroma uses non-isolated build and fails with old setuptools if [[ $GHA_PYTHON_VERSION == 3.9 ]]; then # To match pyproject.toml - python3 -m pip install "setuptools>=67.8" + python3 -m pip install "setuptools>=77" fi # webp diff --git a/pyproject.toml b/pyproject.toml index 780a938a3..3f9c916c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] build-backend = "backend" requires = [ - "setuptools>=67.8", + "setuptools>=77", ] backend-path = [ "_custom_build", @@ -14,14 +14,14 @@ readme = "README.md" keywords = [ "Imaging", ] -license = { text = "MIT-CMU" } +license = "MIT-CMU" +license-files = [ "LICENSE" ] authors = [ { name = "Jeffrey A. Clark", email = "aclark@aclark.net" }, ] requires-python = ">=3.9" classifiers = [ "Development Status :: 6 - Mature", - "License :: OSI Approved :: CMU License (MIT-CMU)", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From d8a0cb5db104cc5d9acc6b4ba1ba871636132f51 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 31 Mar 2025 22:53:51 +0300 Subject: [PATCH 2/2] Work around pyroma test --- Tests/test_pyroma.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Tests/test_pyroma.py b/Tests/test_pyroma.py index c2f7fe22e..8235daf32 100644 --- a/Tests/test_pyroma.py +++ b/Tests/test_pyroma.py @@ -23,5 +23,11 @@ def test_pyroma() -> None: ) else: - # Should have a perfect score - assert rating == (10, []) + # Should have a perfect score, but pyroma does not support PEP 639 yet. + assert rating == ( + 9, + [ + "Your package does neither have a license field " + "nor any license classifiers." + ], + )