]> 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:32:00 +0000 (21:32 -0700)
committerNed Deily <nad@acm.org>
Sat, 19 Oct 2013 04:32:00 +0000 (21:32 -0700)
setup.py

index 461d37901b4d9267c31afcbaf5a8d4fdfab97da2..fe2dd6e6d1c62a893d3dcee12117af2a8b29cda5 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1313,6 +1313,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:])
             with open(zlib_h) as fp:
                 while 1:
                     line = fp.readline()