0019-Add-option-to-disable-the-sqlite3-module.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From 570e1e81484d9bcbd30a7719b07d02785a5cab24 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 7 Mar 2017 22:28:06 +0100
  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. ---
  8. Makefile.pre.in | 7 +++++--
  9. configure.ac | 9 +++++++++
  10. 2 files changed, 14 insertions(+), 2 deletions(-)
  11. diff --git a/Makefile.pre.in b/Makefile.pre.in
  12. index b2a0490..974a052 100644
  13. --- a/Makefile.pre.in
  14. +++ b/Makefile.pre.in
  15. @@ -1043,7 +1043,6 @@ LIBSUBDIRS= lib-tk site-packages \
  16. email email/mime \
  17. ensurepip ensurepip/_bundled \
  18. json \
  19. - sqlite3 \
  20. logging bsddb csv importlib wsgiref \
  21. ctypes ctypes/macholib \
  22. idlelib idlelib/Icons \
  23. @@ -1061,7 +1060,6 @@ TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
  24. test/tracedmodules \
  25. email/test email/test/data \
  26. json/tests \
  27. - sqlite3/test \
  28. bsddb/test \
  29. ctypes/test \
  30. idlelib/idle_test \
  31. @@ -1084,6 +1082,11 @@ TESTSUBDIRS += lib2to3/tests \
  32. lib2to3/tests/data/fixers/myfixes
  33. endif
  34. +ifeq (@SQLITE3@,yes)
  35. +LIBSUBDIRS += sqlite3
  36. +TESTSUBDIRS += sqlite3/test
  37. +endif
  38. +
  39. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  40. @for i in $(SCRIPTDIR) $(LIBDEST); \
  41. do \
  42. diff --git a/configure.ac b/configure.ac
  43. index 270f337..e9e1897 100644
  44. --- a/configure.ac
  45. +++ b/configure.ac
  46. @@ -2805,6 +2805,15 @@ if test "$posix_threads" = "yes"; then
  47. AC_CHECK_FUNCS(pthread_atfork)
  48. fi
  49. +AC_SUBST(SQLITE3)
  50. +AC_ARG_ENABLE(sqlite3,
  51. + AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
  52. + [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
  53. +
  54. +if test "$SQLITE3" = "no" ; then
  55. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
  56. +fi
  57. +
  58. AC_SUBST(PYDOC)
  59. AC_ARG_ENABLE(pydoc,
  60. --
  61. 2.7.4