mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 23:16:56 +04:00
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 <alex@shruggie.ro>
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From 3fabaeec684fae934055b85c2f91c1bd700c71b0 Mon Sep 17 00:00:00 2001
|
|
From: Alexandru Ardelean <alex@shruggie.ro>
|
|
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 <alex@shruggie.ro>
|
|
---
|
|
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:
|