Ensure setup.py looks for zlib.h in an OS X SDK.

This commit is contained in:
Ned Deily 2013-10-18 21:32:00 -07:00
parent ac25ca10ed
commit 507c591e5b
1 changed files with 2 additions and 0 deletions

View File

@ -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()