pillow: bump to 12.1.1
authorAlexandru Ardelean <redacted>
Sun, 15 Mar 2026 13:12:45 +0000 (15:12 +0200)
committerAlexandru Ardelean <redacted>
Mon, 23 Mar 2026 18:23:25 +0000 (20:23 +0200)
Pillow 12.x introduces pybind11-based C extension bindings and a
custom build backend (wrapping setuptools.build_meta). This requires:
- Replacing python-setuptools-scm with python-setuptools as build dep
- Adding python-pybind11 as a new build dependency (host)
- Updating build config settings from --build-option flags to the new
  key=value format (e.g. zlib=enable, imagequant=disable)
- Removing the separate webpmux flag (merged into webp feature)

Full release notes:
https://pillow.readthedocs.io/en/stable/releasenotes/index.html

Remove 001-remove-setuptools-version-limit.patch
That's an old relic since when setuptools was packaged inside Python3

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/pillow/Makefile
lang/python/pillow/patches/001-remove-setuptools-version-limit.patch [deleted file]
lang/python/pillow/test.sh

index c6b1faf0ee0f941e22c2918d359ecaacec11edc4..d36f2bc2f96b1c3dc8ab64e8f602c2a15e2100e9 100644 (file)
@@ -7,13 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pillow
-PKG_VERSION:=10.1.0
+PKG_VERSION:=12.1.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=Pillow
-PKG_HASH:=e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38
+PYPI_SOURCE_NAME:=pillow
+PKG_HASH:=9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4
 
-PKG_BUILD_DEPENDS:=python-setuptools-scm/host
+PKG_BUILD_DEPENDS:=python-setuptools/host python-pybind11/host
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=HPND
@@ -39,17 +40,15 @@ define Package/python3-pillow/description
 endef
 
 PYTHON3_PKG_BUILD_CONFIG_SETTINGS += \
-       --build-option=build_ext \
-       --build-option=--enable-zlib \
-       --build-option=--enable-jpeg \
-       --build-option=--enable-webp \
-       --build-option=--enable-webpmux \
-       --build-option=--enable-tiff \
-       --build-option=--enable-freetype \
-       --build-option=--disable-lcms \
-       --build-option=--disable-jpeg2000 \
-       --build-option=--disable-imagequant \
-       --build-option=--disable-platform-guessing
+       zlib=enable \
+       jpeg=enable \
+       webp=enable \
+       tiff=enable \
+       freetype=enable \
+       lcms=disable \
+       jpeg2000=disable \
+       imagequant=disable \
+       platform-guessing=disable
 
 $(eval $(call Py3Package,python3-pillow))
 $(eval $(call BuildPackage,python3-pillow))
diff --git a/lang/python/pillow/patches/001-remove-setuptools-version-limit.patch b/lang/python/pillow/patches/001-remove-setuptools-version-limit.patch
deleted file mode 100644 (file)
index e5ac168..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -1,7 +1,7 @@
- [build-system]
- build-backend = "backend"
- requires = [
--  "setuptools>=67.8",
-+  "setuptools",
- ]
- backend-path = [
-   "_custom_build",
index 9bad29241522e231a46ab37f3d33aa246748ccc0..136f6e385bcf737be0c36e4feead431af70c6f86 100644 (file)
@@ -4,13 +4,23 @@
 
 python3 - << EOF
 import sys
-from PIL import Image, ImageDraw
+from PIL import Image, ImageDraw, features
 
 if (Image.__version__ != "$2"):
     print("Wrong version: " + Image.__version__)
     sys.exit(1)
 
-from PIL import Image, ImageDraw
+# Check format/codec support
+for feature, name in [
+    ("webp",          "WebP"),
+    ("libjpeg_turbo", "JPEG"),
+    ("libtiff",       "TIFF"),
+    ("freetype2",     "FreeType"),
+]:
+    if not features.check(feature):
+        print(f"{name} support not available")
+        sys.exit(1)
+
 img = Image.new('RGB', (100, 30), color = (73, 109, 137))
 d = ImageDraw.Draw(img)
 d.text((10,10), "Hello World", fill=(255,255,0))
git clone https://git.99rst.org/PROJECT