mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-30 10:43:16 +03:00
Merge pull request #5624 from radarhere/macos_zlib
This commit is contained in:
commit
e276655179
18
setup.py
18
setup.py
|
@ -533,14 +533,16 @@ class pil_build_ext(build_ext):
|
||||||
_add_directory(include_dirs, "/usr/X11/include")
|
_add_directory(include_dirs, "/usr/X11/include")
|
||||||
|
|
||||||
# SDK install path
|
# SDK install path
|
||||||
try:
|
sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
|
||||||
sdk_path = (
|
if not os.path.exists(sdk_path):
|
||||||
subprocess.check_output(["xcrun", "--show-sdk-path"])
|
try:
|
||||||
.strip()
|
sdk_path = (
|
||||||
.decode("latin1")
|
subprocess.check_output(["xcrun", "--show-sdk-path"])
|
||||||
)
|
.strip()
|
||||||
except Exception:
|
.decode("latin1")
|
||||||
sdk_path = None
|
)
|
||||||
|
except Exception:
|
||||||
|
sdk_path = None
|
||||||
if sdk_path:
|
if sdk_path:
|
||||||
_add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib"))
|
_add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib"))
|
||||||
_add_directory(include_dirs, os.path.join(sdk_path, "usr", "include"))
|
_add_directory(include_dirs, os.path.join(sdk_path, "usr", "include"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user