[packages/python3-pillow] update setup.py for python 3.13
atler
atler at pld-linux.org
Sat Mar 15 02:39:56 CET 2025
commit c3fbbf3296ce626a74395da948461cdf865cc0e5
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Mar 15 00:48:24 2025 +0100
update setup.py for python 3.13
python3-pillow.spec | 2 ++
python3.13.patch | 15 +++++++++++++++
2 files changed, 17 insertions(+)
---
diff --git a/python3-pillow.spec b/python3-pillow.spec
index 6c37f46..4c2336a 100644
--- a/python3-pillow.spec
+++ b/python3-pillow.spec
@@ -21,6 +21,7 @@ Source0: https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-%{versio
# Source0-md5: 7a1eb5a250c7ccbd549a89e16404f09f
Patch0: %{name}-subpackage.patch
Patch1: x32.patch
+Patch2: python3.13.patch
URL: https://python-pillow.org/
BuildRequires: freetype-devel >= 2
BuildRequires: ghostscript
@@ -141,6 +142,7 @@ Obudowanie obrazów PIL dla Qt.
%if "%{_lib}" == "libx32"
%patch -P 1 -p1
%endif
+%patch -P 2 -p1
%build
%py3_build
diff --git a/python3.13.patch b/python3.13.patch
new file mode 100644
index 0000000..a97d8c2
--- /dev/null
+++ b/python3.13.patch
@@ -0,0 +1,15 @@
+--- Pillow-8.4.0/setup.py.orig 2021-10-15 08:26:23.000000000 +0200
++++ Pillow-8.4.0/setup.py 2025-03-15 00:46:27.183061465 +0100
+@@ -21,9 +21,10 @@
+
+ def get_version():
+ version_file = "src/PIL/_version.py"
++ vars = dict()
+ with open(version_file) as f:
+- exec(compile(f.read(), version_file, "exec"))
+- return locals()["__version__"]
++ exec(compile(f.read(), version_file, "exec"), locals=vars)
++ return vars["__version__"]
+
+
+ NAME = "Pillow"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pillow.git/commitdiff/c3fbbf3296ce626a74395da948461cdf865cc0e5
More information about the pld-cvs-commit
mailing list