mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
try/except around homebrew, fixes #356
This commit is contained in:
parent
9b0bc48d26
commit
c4758452bb
15
setup.py
15
setup.py
|
@ -179,12 +179,15 @@ class pil_build_ext(build_ext):
|
||||||
_add_directory(include_dirs, "/usr/X11/include")
|
_add_directory(include_dirs, "/usr/X11/include")
|
||||||
# if homebrew is installed, use its lib and include directories
|
# if homebrew is installed, use its lib and include directories
|
||||||
import subprocess
|
import subprocess
|
||||||
prefix = subprocess.check_output(['brew', '--prefix'])
|
try:
|
||||||
if prefix:
|
prefix = subprocess.check_output(['brew', '--prefix'])
|
||||||
prefix = prefix.strip()
|
if prefix:
|
||||||
_add_directory(library_dirs, os.path.join(prefix, 'lib'))
|
prefix = prefix.strip()
|
||||||
_add_directory(include_dirs, os.path.join(prefix, 'include'))
|
_add_directory(library_dirs, os.path.join(prefix, 'lib'))
|
||||||
|
_add_directory(include_dirs, os.path.join(prefix, 'include'))
|
||||||
|
except:
|
||||||
|
pass # homebrew not installed
|
||||||
|
|
||||||
elif sys.platform.startswith("linux"):
|
elif sys.platform.startswith("linux"):
|
||||||
for platform_ in (plat.processor(), plat.architecture()[0]):
|
for platform_ in (plat.processor(), plat.architecture()[0]):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user