[Buildroot] [PATCH/next v3 12/14] package/python3: use upstream build system to disable sqlite3 module
Bernd Kuhls
bernd at kuhls.net
Wed Aug 9 21:13:59 UTC 2023
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
.checkpackageignore | 1 -
...option-to-disable-the-sqlite3-module.patch | 62 -------------------
package/python3/python3.mk | 4 +-
3 files changed, 2 insertions(+), 65 deletions(-)
delete mode 100644 package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch
diff --git a/.checkpackageignore b/.checkpackageignore
index 870dd9caaf..2be91b1147 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1221,7 +1221,6 @@ package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch Upstream
package/python3/0011-Add-an-option-to-disable-pydoc.patch Upstream
package/python3/0012-Add-an-option-to-disable-lib2to3.patch Upstream
-package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch Upstream
package/python3/0014-Add-an-option-to-disable-the-tk-module.patch Upstream
package/python3/0020-Add-an-option-to-disable-IDLE.patch Upstream
package/python3/0026-python-config.sh-don-t-reassign-prefix.patch Upstream
diff --git a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch b/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch
deleted file mode 100644
index 795ea3b898..0000000000
--- a/package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From ef8c030e01b1be8be582e90c31298a5863094858 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
-Date: Wed, 22 Feb 2017 17:20:45 -0800
-Subject: [PATCH] Add option to disable the sqlite3 module
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
-Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
-[ Andrey Smirnov: ported to Python 3.6 ]
-Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
-[ Adam Duskett: ported to Python 3.10.0 ]
-Signed-off-by: Adam Duskett <aduskett at gmail.com>
----
- Makefile.pre.in | 5 ++++-
- configure.ac | 9 +++++++++
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index f5d0573067..9f4cdf14cf 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \
- multiprocessing multiprocessing/dummy \
- re \
- site-packages \
-- sqlite3 \
- tkinter \
- tomllib \
- turtledemo \
-@@ -2018,6 +2017,10 @@ TESTSUBDIRS += lib2to3/tests \
- lib2to3/tests/data/fixers/myfixes
- endif
-
-+ifeq (@SQLITE3@,yes)
-+LIBSUBDIRS += sqlite3
-+endif
-+
- TEST_MODULES=@TEST_MODULES@
- libinstall: all $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
-diff --git a/configure.ac b/configure.ac
-index d8e10cf2b2..4cc0951ab9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -4171,6 +4171,15 @@ 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 ])
-+
-+if test "$SQLITE3" = "no" ; then
-+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
-+fi
-+
- AC_SUBST(PYDOC)
-
- AC_ARG_ENABLE(pydoc,
---
-2.34.1
-
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 87dc454185..215bbb6a03 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -22,7 +22,6 @@ PYTHON3_IGNORE_CVES += CVE-2022-45061
HOST_PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
- --disable-sqlite3 \
--disable-tk \
--with-system-expat \
--disable-test-modules \
@@ -46,6 +45,7 @@ HOST_PYTHON3_CONF_ENV += \
py_cv_module__codecs_jp=n/a \
py_cv_module__codecs_kr=n/a \
py_cv_module__codecs_tw=n/a \
+ py_cv_module__sqlite3=n/a \
py_cv_module__uuid=n/a \
ac_cv_prog_HAS_HG=/bin/false
@@ -118,7 +118,7 @@ endif
ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y)
PYTHON3_DEPENDENCIES += sqlite
else
-PYTHON3_CONF_OPTS += --disable-sqlite3
+PYTHON3_CONF_ENV += py_cv_module__sqlite3=n/a
endif
ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y)
--
2.39.2
More information about the buildroot
mailing list