mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Merge pull request #466 from dmckeone/patch-2
Prefer homebrew freetype over X11 freetype (but still allow both)
This commit is contained in:
commit
7bc9a1a3f9
12
setup.py
12
setup.py
|
@ -201,9 +201,7 @@ class pil_build_ext(build_ext):
|
|||
# darwin ports installation directories
|
||||
_add_directory(library_dirs, "/opt/local/lib")
|
||||
_add_directory(include_dirs, "/opt/local/include")
|
||||
# freetype2 ships with X11
|
||||
_add_directory(library_dirs, "/usr/X11/lib")
|
||||
_add_directory(include_dirs, "/usr/X11/include")
|
||||
|
||||
# if homebrew is installed, use its lib and include directories
|
||||
import subprocess
|
||||
try:
|
||||
|
@ -212,8 +210,16 @@ class pil_build_ext(build_ext):
|
|||
prefix = prefix.strip()
|
||||
_add_directory(library_dirs, os.path.join(prefix, 'lib'))
|
||||
_add_directory(include_dirs, os.path.join(prefix, 'include'))
|
||||
|
||||
# freetype2 is a key-only brew under opt/
|
||||
_add_directory(library_dirs, os.path.join(prefix, 'opt', 'freetype', 'lib'))
|
||||
_add_directory(include_dirs, os.path.join(prefix, 'opt', 'freetype', 'include'))
|
||||
except:
|
||||
pass # homebrew not installed
|
||||
|
||||
# freetype2 ships with X11 (after homebrew, so that homebrew freetype is preferred)
|
||||
_add_directory(library_dirs, "/usr/X11/lib")
|
||||
_add_directory(include_dirs, "/usr/X11/include")
|
||||
|
||||
elif sys.platform.startswith("linux"):
|
||||
for platform_ in (plat.processor(), plat.architecture()[0]):
|
||||
|
|
Loading…
Reference in New Issue
Block a user