]> granicus.if.org Git - python/commitdiff
Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.
authorNed Deily <nad@acm.org>
Sun, 5 Aug 2012 21:42:45 +0000 (14:42 -0700)
committerNed Deily <nad@acm.org>
Sun, 5 Aug 2012 21:42:45 +0000 (14:42 -0700)
Misc/NEWS
setup.py

index 587c07d2ddfb03c1a9c146ec3147f1dd5597b1d1..7010133d6de920dc24a3c71ecb992993b885820d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -327,6 +327,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.
index 6dd0422499d9e9631410a015fbbc5e92c393ef8d..b5abe611bc3aa11b5f86b2216e9b56b359159081 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1028,12 +1028,12 @@ class PyBuildExt(build_ext):
         if sys.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 sys.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
                 incf = open(f).read()