mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +03:00
Merge pull request #368 from iElectric/respect_cflags_ldflags
respect CFLAGS/LDFLAGS when searching for headers/libs
This commit is contained in:
commit
8571c43e7f
8
setup.py
8
setup.py
|
@ -214,6 +214,14 @@ class pil_build_ext(build_ext):
|
||||||
_add_directory(library_dirs, "/usr/local/lib")
|
_add_directory(library_dirs, "/usr/local/lib")
|
||||||
# FIXME: check /opt/stuff directories here?
|
# 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:
|
# include, rpath, if set as environment variables:
|
||||||
for k in 'C_INCLUDE_PATH INCLUDE'.split():
|
for k in 'C_INCLUDE_PATH INCLUDE'.split():
|
||||||
if k in os.environ:
|
if k in os.environ:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user