summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS3
-rw-r--r--setup.py9
2 files changed, 10 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 296d864..874498b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -771,6 +771,9 @@ Library
Build
-----
+- Do not accidentally include the directory containing sqlite.h twice when
+ building sqlite3.
+
- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
diff --git a/setup.py b/setup.py
index 896d604..39751c3 100644
--- a/setup.py
+++ b/setup.py
@@ -1045,10 +1045,15 @@ class PyBuildExt(build_ext):
else:
sqlite_extra_link_args = ()
+ include_dirs = ["Modules/_sqlite"]
+ # Only include the directory where sqlite was found if it does
+ # not already exist in set include directories, otherwise you
+ # can end up with a bad search path order.
+ if sqlite_incdir not in self.compiler.include_dirs:
+ include_dirs.append(sqlite_incdir)
exts.append(Extension('_sqlite3', sqlite_srcs,
define_macros=sqlite_defines,
- include_dirs=["Modules/_sqlite",
- sqlite_incdir],
+ include_dirs=include_dirs,
library_dirs=sqlite_libdir,
runtime_library_dirs=sqlite_libdir,
extra_link_args=sqlite_extra_link_args,