]> granicus.if.org Git - python/commitdiff
Ensure setup.py looks for zlib.h in an OS X SDK.
authorNed Deily <nad@acm.org>
Sat, 19 Oct 2013 04:33:57 +0000 (21:33 -0700)
committerNed Deily <nad@acm.org>
Sat, 19 Oct 2013 04:33:57 +0000 (21:33 -0700)
setup.py

index bb7f29595d2a31201cf22c26922d9f4fbdc020f1..de4392ff39a1dd7d7163813202578d78fd2545b2 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1389,6 +1389,8 @@ class PyBuildExt(build_ext):
             zlib_h = zlib_inc[0] + '/zlib.h'
             version = '"0.0.0"'
             version_req = '"1.1.3"'
+            if host_platform == 'darwin' and is_macosx_sdk_path(zlib_h):
+                zlib_h = os.path.join(macosx_sdk_root(), zlib_h[1:])
             fp = open(zlib_h)
             while 1:
                 line = fp.readline()