Skip to content

Commit c300809

Browse files
committed
build/pkgs/pillow: Add python-pillow/Pillow#8050 as a patch
1 parent d80d57f commit c300809

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 57399ce204d79c74c80612c622bb788e20d786e8 Mon Sep 17 00:00:00 2001
2+
From: Andrew Murray <[email protected]>
3+
Date: Fri, 10 May 2024 22:43:56 +1000
4+
Subject: [PATCH] Parse _version contents instead of using exec()
5+
6+
---
7+
setup.py | 3 +--
8+
1 file changed, 1 insertion(+), 2 deletions(-)
9+
10+
diff --git a/setup.py b/setup.py
11+
index 7d8e1c1ee21..abdd87ea252 100644
12+
--- a/setup.py
13+
+++ b/setup.py
14+
@@ -23,8 +23,7 @@
15+
def get_version():
16+
version_file = "src/PIL/_version.py"
17+
with open(version_file, encoding="utf-8") as f:
18+
- exec(compile(f.read(), version_file, "exec"))
19+
- return locals()["__version__"]
20+
+ return f.read().split('"')[1]
21+
22+
23+
configuration = {}

0 commit comments

Comments
 (0)