aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-11-06 11:30:37 +0200
committerGitHub <noreply@github.com>2021-11-06 10:30:37 +0100
commite9594f6747eaaaa848c26e2bf67d467aabfd62b3 (patch)
tree6e0cc5e3aa0a4fb9f924537842dc9b4987d46544 /setup.py
parenta4774f42e35861c4bb16928cffb011c2d8a285ac (diff)
downloadcpython3-e9594f6747eaaaa848c26e2bf67d467aabfd62b3.tar.gz
bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 22c5ccf0a0..b6bf8e1293 100644
--- a/setup.py
+++ b/setup.py
@@ -1602,9 +1602,11 @@ class PyBuildExt(build_ext):
# Enable support for loadable extensions in the sqlite3 module
# if --enable-loadable-sqlite-extensions configure option is used.
- if '--enable-loadable-sqlite-extensions' not in sysconfig.get_config_var("CONFIG_ARGS"):
- sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))
- elif MACOS and sqlite_incdir == os.path.join(MACOS_SDK_ROOT, "usr/include"):
+ if (
+ MACOS and
+ sqlite_incdir == os.path.join(MACOS_SDK_ROOT, "usr/include") and
+ sysconfig.get_config_var("PY_SQLITE_ENABLE_LOAD_EXTENSION")
+ ):
raise DistutilsError("System version of SQLite does not support loadable extensions")
if MACOS: