From 176d1882041ba40bf53b542470c3ebdb374f4e69 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 27 Jul 2025 16:02:51 +0800 Subject: [PATCH] pybind: replace deprecated license classifiers with SPDX expression Replace the deprecated "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)" classifier with the SPDX license expression "LGPL-2.0-or-later" in the license field. Recent setuptools versions warn that license classifiers are deprecated in favor of SPDX expressions in the license field. This change eliminates the deprecation warning while maintaining the same licensing terms. References: - https://setuptools.pypa.io/en/stable/history.html#v77-0-0 - https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license - https://spdx.org/licenses/LGPL-2.0-or-later.html The warning looked like: ``` [1/1] Generating ../../../lib/cython_modules/lib.3/rados.cpython-313-x86_64-linux-gnu.so /usr/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() ``` Signed-off-by: Kefu Chai --- src/pybind/rados/setup.py | 3 +-- src/pybind/rbd/setup.py | 3 +-- src/pybind/rgw/setup.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py index c26d2faab51..c0aa1aa7334 100755 --- a/src/pybind/rados/setup.py +++ b/src/pybind/rados/setup.py @@ -185,7 +185,7 @@ setup( "the distributed object store using a simple file-like interface." ), url='https://github.com/ceph/ceph/tree/master/src/pybind/rados', - license='LGPLv2+', + license='LGPL-2.0-or-later', platforms='Linux', ext_modules=cythonize( [ @@ -203,7 +203,6 @@ setup( classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)', 'Operating System :: POSIX :: Linux', 'Programming Language :: Cython', 'Programming Language :: Python :: 3' diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py index e7671dbb329..c59c4e8f789 100755 --- a/src/pybind/rbd/setup.py +++ b/src/pybind/rbd/setup.py @@ -205,7 +205,7 @@ setup( "of the objects the image is striped over must be a power of two." ), url='https://github.com/ceph/ceph/tree/master/src/pybind/rbd', - license='LGPLv2+', + license='LGPL-2.0-or-later', platforms='Linux', ext_modules=cythonize( [ @@ -222,7 +222,6 @@ setup( classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)', 'Operating System :: POSIX :: Linux', 'Programming Language :: Cython', 'Programming Language :: Python :: 3' diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py index 213de782955..f48e8550c0b 100755 --- a/src/pybind/rgw/setup.py +++ b/src/pybind/rgw/setup.py @@ -193,7 +193,7 @@ setup( "and file operations." ), url='https://github.com/ceph/ceph/tree/master/src/pybind/rgw', - license='LGPLv2+', + license='LGPL-2.0-or-later', platforms='Linux', ext_modules=cythonize( [ @@ -210,7 +210,6 @@ setup( classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)', 'Operating System :: POSIX :: Linux', 'Programming Language :: Cython', 'Programming Language :: Python :: 3', -- 2.47.3