Skip to content

Commit

Permalink
py-Pillow: add py313 subport
Browse files Browse the repository at this point in the history
This includes a backport of
python-pillow/Pillow#8050
(python-pillow/Pillow@57399ce)
from Pillow 10.4.0, necessary for Python 3.13 compatibility. See
python/cpython#118888.
  • Loading branch information
markmentovai committed Nov 6, 2024
1 parent 443421b commit da8fd95
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/py-Pillow/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 16 additions & 4 deletions python/py-Pillow/files/patch-setup.py.diff
Original file line number Diff line number Diff line change
@@ -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":
Expand Down Expand Up @@ -54,4 +66,4 @@
+ _add_directory(include_dirs, "@prefix@/include")
elif (
sys.platform.startswith("linux")
or sys.platform.startswith("gnu")
or sys.platform.startswith("gnu")

0 comments on commit da8fd95

Please sign in to comment.