kumquat-buildroot/package/python3/0011-Add-option-to-disable-the-sqlite3-module.patch
Adam Duskett 36e635d2d5 package/python3: bump version to 3.12.1
Python 3.12.1 has removed distutils support. As such, we remove the distutils
option from pkg-python.mk as well.

Tested on Fedora 39, and Debian 11. All 68 package tests pass.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-06 23:21:22 +01:00

62 lines
1.7 KiB
Diff

From 39c39b93110f702f7fd8cefb0f456b40d6ace98a Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Tue, 6 Feb 2024 22:12:20 +0100
Subject: [PATCH] Add option to disable the sqlite3 module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
Makefile.pre.in | 5 ++++-
configure.ac | 7 +++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 28ba723fe83..9bbe16d4cb8 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2106,7 +2106,6 @@ LIBSUBDIRS= asyncio \
multiprocessing multiprocessing/dummy \
re \
site-packages \
- sqlite3 \
tkinter \
tomllib \
turtledemo \
@@ -2263,6 +2262,10 @@ ifeq (@IDLE@,yes)
LIBSUBDIRS += idlelib idlelib/Icons
endif
+ifeq (@SQLITE3@,yes)
+LIBSUBDIRS += sqlite3
+endif
+
TEST_MODULES=@TEST_MODULES@
.PHONY: libinstall
diff --git a/configure.ac b/configure.ac
index 1bb63cbd5b2..c8ae60aa6b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4490,6 +4490,13 @@ AS_VAR_IF([posix_threads], [stub], [
AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])
])
+AC_SUBST(SQLITE3)
+AC_ARG_ENABLE(sqlite3,
+ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
+ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
+AS_IF([test "$SQLITE3" = "no"],
+ [PY_STDLIB_MOD_SET_NA([_sqlite3])])
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.43.0