mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Handle polymorphic types for lib_root and include_root in setup.py
Depending on whether these are created by pkg_config or not they might be a list of directories or just a string with a single directory.
This commit is contained in:
parent
943a7a89c5
commit
d94239ae3d
14
setup.py
14
setup.py
|
@ -473,11 +473,17 @@ class pil_build_ext(build_ext):
|
|||
lib_root = include_root = root
|
||||
|
||||
if lib_root is not None:
|
||||
for lib_dir in lib_root:
|
||||
_add_directory(library_dirs, lib_dir)
|
||||
if isinstance(lib_root, str):
|
||||
_add_directory(library_dirs, lib_root)
|
||||
else:
|
||||
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)
|
||||
if isinstance(include_root, str):
|
||||
_add_directory(include_dirs, include_root)
|
||||
else:
|
||||
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