pillow: bump to 12.1.1

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 <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2026-03-15 15:12:45 +02:00
committed by Alexandru Ardelean
parent 432fa809dd
commit df78cf6b01
3 changed files with 25 additions and 27 deletions

View 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))

View File

@@ -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",

View 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))