From 6bec81f1cf16b0856e8d32c99e424e14a5f41c41 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Thu, 19 Nov 2026 14:56:51 +0100 Subject: [PATCH] python-protobuf: drop unused dependencies python3-protobuf depends on protobuf and python3-ctypes, and the build depends on protobuf/host. The PyPI source builds its extension module from the bundled upb and utf8_range sources, ships the generated _pb2 modules and never runs protoc. Nothing in it uses ctypes. The extension module needs only libc, libgcc_s and libpython in the snapshot builds of ten architectures. Depend on python3-light alone. A clean aarch64 system then installs 9.0 MB less, because protobuf, protobuf-lite, libstdcpp, libatomic, python3-ctypes and libffi are no longer pulled in. Signed-off-by: Josef Schlehofer --- lang/python/python-protobuf/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lang/python/python-protobuf/Makefile b/lang/python/python-protobuf/Makefile index f80364d843..f3be556885 100644 --- a/lang/python/python-protobuf/Makefile +++ b/lang/python/python-protobuf/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-protobuf PKG_VERSION:=7.36.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=protobuf PKG_HASH:=497d0463ff3316681da6c0b9e8d06cb465d61abce00b613ab42226175644d1bb @@ -14,7 +14,7 @@ PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:google:protobuf -PKG_BUILD_DEPENDS:=protobuf/host python-setuptools/host +PKG_BUILD_DEPENDS:=python-setuptools/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk @@ -26,10 +26,7 @@ define Package/python3-protobuf SUBMENU:=Python TITLE:=Protobuf support for Python URL:=https://github.com/protocolbuffers/protobuf - DEPENDS:= \ - +protobuf \ - +python3-ctypes \ - +python3-light + DEPENDS:=+python3-light endef define Package/python3-protobuf/description