Skip to content

Commit

Permalink
build/pkgs/pillow: Add python-pillow/Pillow#8050 as a patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 15, 2024
1 parent d80d57f commit c300809
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build/pkgs/pillow/patches/8050.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 57399ce204d79c74c80612c622bb788e20d786e8 Mon Sep 17 00:00:00 2001
From: Andrew Murray <[email protected]>
Date: Fri, 10 May 2024 22:43:56 +1000
Subject: [PATCH] Parse _version contents instead of using exec()

---
setup.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 7d8e1c1ee21..abdd87ea252 100644
--- a/setup.py
+++ b/setup.py
@@ -23,8 +23,7 @@
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]


configuration = {}

0 comments on commit c300809

Please sign in to comment.