blob: e63314f609123cf24174df796293355a0c5d3397 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
https://bugs.gentoo.org/show_bug.cgi?id=335505
https://bugs.python.org/issue10268
--- configure.ac
+++ configure.ac
@@ -2332,6 +2332,15 @@
TCLTK_LIBS="$with_tcltk_libs"
fi
+# Check for support for loadable sqlite extensions
+AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
+AC_ARG_ENABLE(loadable-sqlite-extensions,
+ AS_HELP_STRING([--enable-loadable-sqlite-extensions], [support loadable extensions in _sqlite module]),
+ [],
+ [enable_loadable_sqlite_extensions="no"])
+
+AC_MSG_RESULT($enable_loadable_sqlite_extensions)
+
# Check for --with-dbmliborder
AC_MSG_CHECKING(for --with-dbmliborder)
AC_ARG_WITH(dbmliborder,
--- setup.py
+++ setup.py
@@ -1186,8 +1186,10 @@
else:
sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
- # Comment this out if you want the sqlite3 module to be able to load extensions.
- sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))
+ # 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"))
if host_platform == 'darwin':
# In every directory on the search path search for a dynamic
|