From 8c5f07f5eade65128e5f314c782e9358f59ab920 Mon Sep 17 00:00:00 2001 From: Meithal Date: Tue, 9 Jun 2020 00:39:42 +0200 Subject: [PATCH] Update setup.py This lets you locally install Pillow on Windows if you built it following the instructions of winbuild with pip install --editable ..\Pillow --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 8c9f0213f..7345f2165 100755 --- a/setup.py +++ b/setup.py @@ -391,6 +391,10 @@ class pil_build_ext(build_ext): _dbg("Looking for `%s` using pkg-config." % lib_name) root = pkg_config(lib_name) + winbuil_root = os.path.join('.', 'winbuild', 'build') + if root is None and os.path.isdir(winbuil_root): + root = os.path.join(winbuil_root, 'lib'), os.path.join(winbuil_root, 'inc') + if isinstance(root, tuple): lib_root, include_root = root else: