mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
respect CFLAGS/LDFLAGS when searching for headers/libs
This commit is contained in:
parent
34944bf533
commit
9b6af55702
8
setup.py
8
setup.py
|
@ -214,6 +214,14 @@ class pil_build_ext(build_ext):
|
|||
_add_directory(library_dirs, "/usr/local/lib")
|
||||
# FIXME: check /opt/stuff directories here?
|
||||
|
||||
# respect CFLAGS/LDFLAGS
|
||||
for k in 'CFLAGS LDFLAGS'.split():
|
||||
if k in os.environ:
|
||||
for match in re.finditer(r'-I([^\s]+)', os.environ[k]):
|
||||
_add_directory(include_dirs, match.group(1))
|
||||
for match in re.finditer(r'-L([^\s]+)', os.environ[k]):
|
||||
_add_directory(library_dirs, match.group(1))
|
||||
|
||||
# include, rpath, if set as environment variables:
|
||||
for k in 'C_INCLUDE_PATH INCLUDE'.split():
|
||||
if k in os.environ:
|
||||
|
|
Loading…
Reference in New Issue
Block a user