mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Added macOS SDK install path to library and include dirs
This commit is contained in:
parent
4658c0523f
commit
928e5c6e8f
12
setup.py
12
setup.py
|
@ -477,6 +477,18 @@ class pil_build_ext(build_ext):
|
|||
_add_directory(library_dirs, "/usr/X11/lib")
|
||||
_add_directory(include_dirs, "/usr/X11/include")
|
||||
|
||||
# SDK install path
|
||||
try:
|
||||
sdk_path = (
|
||||
subprocess.check_output(["xcrun", "--show-sdk-path"])
|
||||
.strip()
|
||||
.decode("latin1")
|
||||
)
|
||||
except Exception:
|
||||
sdk_path = None
|
||||
if sdk_path:
|
||||
_add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib"))
|
||||
_add_directory(include_dirs, os.path.join(sdk_path, "usr", "include"))
|
||||
elif (
|
||||
sys.platform.startswith("linux")
|
||||
or sys.platform.startswith("gnu")
|
||||
|
|
Loading…
Reference in New Issue
Block a user