From da8fd955a6b8fb64f1fb77470844872036df5efb Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Mon, 4 Nov 2024 14:52:33 -0500 Subject: [PATCH] py-Pillow: add py313 subport This includes a backport of https://github.com/python-pillow/Pillow/pull/8050 (https://github.com/python-pillow/Pillow/commit/57399ce204d79c74c80612c622bb788e20d786e8) from Pillow 10.4.0, necessary for Python 3.13 compatibility. See https://github.com/python/cpython/issues/118888. --- python/py-Pillow/Portfile | 2 +- python/py-Pillow/files/patch-setup.py.diff | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/python/py-Pillow/Portfile b/python/py-Pillow/Portfile index f543d8c9807bf..a5497eb763b91 100644 --- a/python/py-Pillow/Portfile +++ b/python/py-Pillow/Portfile @@ -9,7 +9,7 @@ revision 1 categories-append devel license BSD -python.versions 27 37 38 39 310 311 312 +python.versions 27 37 38 39 310 311 312 313 python.pep517 no maintainers {stromnov @stromnov} openmaintainer diff --git a/python/py-Pillow/files/patch-setup.py.diff b/python/py-Pillow/files/patch-setup.py.diff index a51b6e8009494..a80221fecc847 100644 --- a/python/py-Pillow/files/patch-setup.py.diff +++ b/python/py-Pillow/files/patch-setup.py.diff @@ -1,6 +1,18 @@ ---- setup.py.orig 2021-10-15 09:26:23.000000000 +0300 -+++ setup.py 2021-10-16 16:06:42.000000000 +0300 -@@ -510,52 +510,9 @@ class pil_build_ext(build_ext): +diff --git setup.py setup.py +index 07d6c66d655e..a77263ef2900 100755 +--- setup.py ++++ setup.py +@@ -22,8 +22,7 @@ from setuptools.command.build_ext import build_ext + def get_version(): + version_file = "src/PIL/_version.py" + with open(version_file, encoding="utf-8") as f: +- exec(compile(f.read(), version_file, "exec")) +- return locals()["__version__"] ++ return f.read().split('"')[1] + + + PILLOW_VERSION = get_version() +@@ -517,52 +516,9 @@ class pil_build_ext(build_ext): ) elif sys.platform == "darwin": @@ -54,4 +66,4 @@ + _add_directory(include_dirs, "@prefix@/include") elif ( sys.platform.startswith("linux") - or sys.platform.startswith("gnu") \ No newline at end of file + or sys.platform.startswith("gnu")