diff options
-rw-r--r-- | databases/py-sqlite3/files/setup3.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/databases/py-sqlite3/files/setup3.py b/databases/py-sqlite3/files/setup3.py index 4a5bf6bb5ef6..7407503ceb54 100644 --- a/databases/py-sqlite3/files/setup3.py +++ b/databases/py-sqlite3/files/setup3.py @@ -3,6 +3,8 @@ # python setup.py install # +import platform + try: import distutils from distutils import sysconfig @@ -19,7 +21,6 @@ lib_dirs = [prefix + "/lib"] libs = ["sqlite3"] macros = [('MODULE_NAME', '"sqlite3"')] sqlite_srcs = [ -'_sqlite/cache.c', '_sqlite/connection.c', '_sqlite/cursor.c', '_sqlite/microprotocols.c', @@ -29,6 +30,11 @@ sqlite_srcs = [ '_sqlite/statement.c', '_sqlite/util.c'] +major, minor = map(int, platform.python_version_tuple()[:2]) + +if (major, minor) <= (3, 10): + sqlite_srcs.append('_sqlite/cache.c',) + try: import ctypes ctypes.CDLL('libsqlite3.so').sqlite3_load_extension |