mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #6896 from sebastic/tiff-multiarch
Handle more than one directory returned by pkg-config
This commit is contained in:
commit
6a700693a5
26
setup.py
26
setup.py
|
@ -263,18 +263,18 @@ def _pkg_config(name):
|
|||
if not DEBUG:
|
||||
command_libs.append("--silence-errors")
|
||||
command_cflags.append("--silence-errors")
|
||||
libs = (
|
||||
libs = re.split(
|
||||
r"(^|\s+)-L",
|
||||
subprocess.check_output(command_libs, stderr=stderr)
|
||||
.decode("utf8")
|
||||
.strip()
|
||||
.replace("-L", "")
|
||||
)
|
||||
cflags = (
|
||||
subprocess.check_output(command_cflags)
|
||||
.strip(),
|
||||
)[::2][1:]
|
||||
cflags = re.split(
|
||||
r"(^|\s+)-I",
|
||||
subprocess.check_output(command_cflags, stderr=stderr)
|
||||
.decode("utf8")
|
||||
.strip()
|
||||
.replace("-I", "")
|
||||
)
|
||||
.strip(),
|
||||
)[::2][1:]
|
||||
return libs, cflags
|
||||
except Exception:
|
||||
pass
|
||||
|
@ -473,8 +473,12 @@ class pil_build_ext(build_ext):
|
|||
else:
|
||||
lib_root = include_root = root
|
||||
|
||||
_add_directory(library_dirs, lib_root)
|
||||
_add_directory(include_dirs, include_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)
|
||||
|
||||
# respect CFLAGS/CPPFLAGS/LDFLAGS
|
||||
for k in ("CFLAGS", "CPPFLAGS", "LDFLAGS"):
|
||||
|
|
Loading…
Reference in New Issue
Block a user