From: Alexandru Ardelean Date: Tue, 11 Aug 2026 06:22:14 +0000 (+0300) Subject: pillow: drop the pybind11 build dependency X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=9ab5244d8ab6bd1909104b34a594797c6fb203a0;p=openwrt-packages.git pillow: drop the pybind11 build dependency Pillow uses pybind11 only for pybind11.setup_helpers.ParallelCompile, which parallelises the C extension build; it ships no runtime bindings. Patch setup.py to remove that import and call and drop pybind11 from build-system.requires, then remove python-pybind11/host from PKG_BUILD_DEPENDS. The C extensions are compiled serially instead, with no functional change to the package. Signed-off-by: Alexandru Ardelean --- diff --git a/lang/python/pillow/Makefile b/lang/python/pillow/Makefile index 20e9763d2..ad8694723 100644 --- a/lang/python/pillow/Makefile +++ b/lang/python/pillow/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pillow PKG_VERSION:=12.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=Pillow PYPI_SOURCE_NAME:=pillow PKG_HASH:=a830b1a40919539d07806aa58e1b114df53ddd43213d9c8b75847eee6c0182b5 -PKG_BUILD_DEPENDS:=python-setuptools/host python-pybind11/host +PKG_BUILD_DEPENDS:=python-setuptools/host PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=HPND diff --git a/lang/python/pillow/patches/010-drop-pybind11-parallelcompile.patch b/lang/python/pillow/patches/010-drop-pybind11-parallelcompile.patch new file mode 100644 index 000000000..859539462 --- /dev/null +++ b/lang/python/pillow/patches/010-drop-pybind11-parallelcompile.patch @@ -0,0 +1,46 @@ +From 3fabaeec684fae934055b85c2f91c1bd700c71b0 Mon Sep 17 00:00:00 2001 +From: Alexandru Ardelean +Date: Tue, 11 Aug 2026 10:30:00 +0300 +Subject: [PATCH] setup.py: drop the pybind11 build dependency + +pybind11 is only used for pybind11.setup_helpers.ParallelCompile, a +build-time helper that parallelises the C extension compilation. Pillow +ships no pybind11 bindings, so remove the import, the ParallelCompile +call and the pybind11 build-system requirement; the C extensions are +then compiled serially. + +Signed-off-by: Alexandru Ardelean +--- + pyproject.toml | 1 - + setup.py | 3 --- + 2 files changed, 4 deletions(-) + +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,7 +1,6 @@ + [build-system] + build-backend = "backend" + requires = [ +- "pybind11", + "setuptools>=77", + ] + backend-path = [ +--- a/setup.py ++++ b/setup.py +@@ -17,7 +17,6 @@ import sys + import warnings + from collections.abc import Iterator + +-from pybind11.setup_helpers import ParallelCompile + from setuptools import Extension, setup + from setuptools.command.build_ext import build_ext + +@@ -32,8 +31,6 @@ while sys.argv[-1].startswith("--pillow- + _, key, value = sys.argv.pop().split("=", 2) + configuration.setdefault(key, []).append(value) + +-default = int(configuration.get("parallel", ["0"])[-1]) +-ParallelCompile("MAX_CONCURRENCY", default).install() + + + def get_version() -> str: