From: Ned Deily Date: Sun, 5 Aug 2012 22:13:33 +0000 (-0700) Subject: Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. X-Git-Tag: v3.3.0b2~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b635837c5629e07a2a8fd400d06f054d3a8f940;p=python Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. --- diff --git a/Misc/NEWS b/Misc/NEWS index 53f62a0c71..5fa62fe959 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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. diff --git a/setup.py b/setup.py index d419d4850d..bc1e1bbd87 100644 --- a/setup.py +++ b/setup.py @@ -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: