mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
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>
(cherry picked from commit df78cf6b01)
31 lines
702 B
Bash
31 lines
702 B
Bash
#!/bin/sh
|
|
|
|
[ "$1" = "python3-pillow" ] || exit 0
|
|
|
|
python3 - << EOF
|
|
import sys
|
|
from PIL import Image, ImageDraw, features
|
|
|
|
if (Image.__version__ != "$2"):
|
|
print("Wrong version: " + Image.__version__)
|
|
sys.exit(1)
|
|
|
|
# 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))
|
|
|
|
# Getting here means we did not get exceptions
|
|
sys.exit(0)
|
|
EOF
|