Description: setup.py: do not use pkg_resources The pkg_resources API was dropped in setuptools v82. It was only used in grpc when building for Mac OS, so it is safe to drop the import and call for Debian. Author: Theodore Tucker Bug-Debian: https://bugs.debian.org/1147772 Forwarded: not-needed Last-Update: 2026-09-28 --- --- ./setup.py +++ ./setup.py @@ -40,7 +40,6 @@ import sys import sysconfig import _metadata -import pkg_resources from setuptools.command import egg_info # Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in. @@ -419,20 +418,6 @@ if "linux" in sys.platform or "darwin" i DEFINE_MACROS += (('PyMODINIT_FUNC', pymodinit),) DEFINE_MACROS += (('GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK', 1),) -# By default, Python3 distutils enforces compatibility of -# c plugins (.so files) with the OSX version Python was built with. -# We need OSX 10.10, the oldest which supports C++ thread_local. -# Python 3.9: Mac OS Big Sur sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') returns int (11) -if 'darwin' in sys.platform: - mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') - if mac_target: - mac_target = pkg_resources.parse_version(str(mac_target)) - if mac_target < pkg_resources.parse_version('10.10.0'): - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.10' - os.environ['_PYTHON_HOST_PLATFORM'] = re.sub( - r'macosx-[0-9]+\.[0-9]+-(.+)', r'macosx-10.10-\1', - util.get_platform()) - def cython_extensions_and_necessity(): cython_module_files = [