From ac490531f1d1e8ca0d6968d1c689adfe5292bf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Fri, 12 Sep 2025 16:06:51 +0200 Subject: [PATCH] python/docker: finalize pyproject build-system and SPDX license - Bump setuptools floor to >=61 in pyproject.toml with rationale comments. - Declare build-backend explicitly; keep classic scikit-build. - Switch setup.py license to SPDX expression (GPL-3.0-or-later) and remove deprecated license classifier, keeping only non-license classifiers. --- python/pyproject.toml | 7 +++++-- python/setup.py.in | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 7d2969ecb4..64ae25de91 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,11 +1,14 @@ [build-system] +# NOTE: Setuptools >=61 fully supports pyproject-based builds and is the common +# floor for projects that may later adopt PEP 621 metadata. Keeping scikit-build +# classic for now; full migration is tracked in the TODO below. requires= [ - "setuptools>=42", + "setuptools>=61", "scikit-build>=0.13", "cmake>=3.15", "ninja" ] -# NOTE (2025-09-12): Explicitly declare the backend used by `python -m build`. +# Used by `python -m build` (PEP 517). build-backend = "setuptools.build_meta" # TODO (modernization): Consider migrating to scikit-build-core and PEP 621. diff --git a/python/setup.py.in b/python/setup.py.in index 1fcba564be..f55c988ef0 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -35,11 +35,13 @@ setup( ], package_data={'opm' : ['$']}, include_package_data=True, - license='Open Source', + # SPDX license expression to replace deprecated license classifier usage. + license='GPL-3.0-or-later', install_requires=requires, python_requires='>=3.8', + # NOTE (2025-09-12): Remove deprecated license classifier in favor of + # SPDX license expression above. Keep non-license classifiers only. classifiers=[ "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", ], )