Skip to content

Commit

Permalink
python10Packages.pillow: 9.4.0 -> 9.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Apr 27, 2023
1 parent d27f79a commit aaaa52b
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From d71eade071704c3f10709b49335eba886f2ac5b2 Mon Sep 17 00:00:00 2001
From: roblabla <unfiltered@roblab.la>
Date: Thu, 27 Apr 2023 11:40:58 +0200
Subject: [PATCH] Revert "Handle more than one directory returned by
pkg-config."

This reverts commit 04cf5e2cfc5dc1676efd9f5c8d605ddfccb0f9ee.
---
setup.py | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/setup.py b/setup.py
index 07d6c66d6..348ad1482 100755
--- a/setup.py
+++ b/setup.py
@@ -265,16 +265,18 @@ def _pkg_config(name):
if not DEBUG:
command_libs.append("--silence-errors")
command_cflags.append("--silence-errors")
- libs = re.split(
- r"(^|\s+)-L",
+ libs = (
subprocess.check_output(command_libs, stderr=stderr)
.decode("utf8")
- .strip(),
- )[::2][1:]
- cflags = re.split(
- r"(^|\s+)-I",
- subprocess.check_output(command_cflags).decode("utf8").strip(),
- )[::2][1:]
+ .strip()
+ .replace("-L", "")
+ )
+ cflags = (
+ subprocess.check_output(command_cflags)
+ .decode("utf8")
+ .strip()
+ .replace("-I", "")
+ )
return libs, cflags
except Exception:
pass
@@ -472,12 +474,8 @@ class pil_build_ext(build_ext):
else:
lib_root = include_root = root

- if lib_root is not None:
- for lib_dir in lib_root:
- _add_directory(library_dirs, lib_dir)
- if include_root is not None:
- for include_dir in include_root:
- _add_directory(include_dirs, include_dir)
+ _add_directory(library_dirs, lib_root)
+ _add_directory(include_dirs, include_root)

# respect CFLAGS/CPPFLAGS/LDFLAGS
for k in ("CFLAGS", "CPPFLAGS", "LDFLAGS"):
--
2.37.1 (Apple Git-137.1)

8 changes: 6 additions & 2 deletions pkgs/development/python-modules/pillow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@

import ./generic.nix (rec {
pname = "pillow";
version = "9.4.0";
version = "9.5.0";
format = "setuptools";

disabled = pythonOlder "3.7";

src = fetchPypi {
pname = "Pillow";
inherit version;
hash = "sha256-ocLXeARI65P7zDeJvzkWqlcg2ULjeUX0BWaAMX8c0j4=";
hash = "sha256-v1SEedM2cm16Ds6252fhefveN4M65CeUYCYxoHDWMPE=";
};

# Reverts 04cf5e2cfc5dc1676efd9f5c8d605ddfccb0f9ee, which prevents pillow from
# finding zlib.
patches = [ ./0001-Revert-Handle-more-than-one-directory-returned-by-pk.patch ];

passthru.tests = {
inherit imageio matplotlib pilkit pydicom reportlab;
};
Expand Down

0 comments on commit aaaa52b

Please sign in to comment.