2
1

0015-Add-option-to-disable-the-sqlite3-module.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From dd2722dec08eb9c72c36313e93661eeca3ad64d8 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 22 Feb 2017 17:20:45 -0800
  4. Subject: [PATCH] Add option to disable the sqlite3 module
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  7. [ Andrey Smirnov: ported to Python 3.6 ]
  8. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
  9. [ Adam Duskett: ported to Python 3.10.0 ]
  10. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  11. ---
  12. Makefile.pre.in | 7 +++++--
  13. configure.ac | 9 +++++++++
  14. 2 files changed, 14 insertions(+), 2 deletions(-)
  15. diff --git a/Makefile.pre.in b/Makefile.pre.in
  16. index 5847029..5628860 100644
  17. --- a/Makefile.pre.in
  18. +++ b/Makefile.pre.in
  19. @@ -1446,7 +1446,6 @@ LIBSUBDIRS= asyncio \
  20. logging \
  21. multiprocessing multiprocessing/dummy \
  22. site-packages \
  23. - sqlite3 \
  24. tkinter \
  25. turtledemo \
  26. unittest \
  27. @@ -1459,7 +1458,6 @@ LIBSUBDIRS= asyncio \
  28. TESTSUBDIRS= ctypes/test \
  29. distutils/tests \
  30. idlelib/idle_test \
  31. - sqlite3/test \
  32. test test/audiodata \
  33. test/capath test/cjkencodings \
  34. test/data test/decimaltestdata \
  35. @@ -1540,6 +1538,11 @@ TESTSUBDIRS += lib2to3/tests \
  36. lib2to3/tests/data/fixers/myfixes
  37. endif
  38. +ifeq (@SQLITE3@,yes)
  39. +LIBSUBDIRS += sqlite3
  40. +TESTSUBDIRS += sqlite3/test
  41. +endif
  42. +
  43. TEST_MODULES=@TEST_MODULES@
  44. libinstall: build_all $(srcdir)/Modules/xxmodule.c
  45. @for i in $(SCRIPTDIR) $(LIBDEST); \
  46. diff --git a/configure.ac b/configure.ac
  47. index 34c2ba9..dfee472 100644
  48. --- a/configure.ac
  49. +++ b/configure.ac
  50. @@ -3373,6 +3373,15 @@ if test "$posix_threads" = "yes"; then
  51. AC_CHECK_FUNCS(pthread_getcpuclockid)
  52. fi
  53. +AC_SUBST(SQLITE3)
  54. +AC_ARG_ENABLE(sqlite3,
  55. + AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
  56. + [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
  57. +
  58. +if test "$SQLITE3" = "no" ; then
  59. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
  60. +fi
  61. +
  62. AC_SUBST(PYDOC)
  63. AC_ARG_ENABLE(pydoc,
  64. --
  65. 2.30.2