]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44997: macOS does not support loadable SQLite extensions (GH-27979) (GH-27996)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 27 Aug 2021 11:27:45 +0000 (04:27 -0700)
committerGitHub <noreply@github.com>
Fri, 27 Aug 2021 11:27:45 +0000 (13:27 +0200)
Authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
(cherry picked from commit 2ec9428e3516b6e7c6583687aa3b39fb96925577)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
setup.py

index 0a2a435c609045b8b39b8dd943a517c96d310b6e..2d6b05682d2ba9d0bc87b5f67c2957488707437d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1416,6 +1416,8 @@ class PyBuildExt(build_ext):
             # 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"):
+                raise DistutilsError("System version of SQLite does not support loadable extensions")
 
             if MACOS:
                 # In every directory on the search path search for a dynamic