Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.

This commit is contained in:
Ned Deily 2012-08-05 15:13:33 -07:00
parent 9ccf82d844
commit 9b635837c5
2 changed files with 6 additions and 4 deletions

View File

@ -304,6 +304,8 @@ Tests
Build
-----
- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.
- Issue #8847: Disable COMDAT folding in Windows PGO builds.
- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs.

View File

@ -1041,12 +1041,12 @@ class PyBuildExt(build_ext):
if host_platform == 'darwin':
sysroot = macosx_sdk_root()
for d in inc_dirs + sqlite_inc_paths:
f = os.path.join(d, "sqlite3.h")
for d_ in inc_dirs + sqlite_inc_paths:
d = d_
if host_platform == 'darwin' and is_macosx_sdk_path(d):
f = os.path.join(sysroot, d[1:], "sqlite3.h")
d = os.path.join(sysroot, d[1:])
f = os.path.join(d, "sqlite3.h")
if os.path.exists(f):
if sqlite_setup_debug: print("sqlite: found %s"%f)
with open(f) as file: