diff --git a/setup.py b/setup.py index 0a2a435c609045..2d6b05682d2ba9 100644 --- a/setup.py +++ b/setup.py @@ -1416,6 +1416,8 @@ def detect_sqlite(self): # 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