2
1

0020-Add-option-to-disable-the-sqlite3-module.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From f218ef22019d4c03427113982edc42beddd05683 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 23 Dec 2015 11:49:01 +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 6656f48..433cac1 100644
  13. --- a/Makefile.pre.in
  14. +++ b/Makefile.pre.in
  15. @@ -1144,7 +1144,6 @@ LIBSUBDIRS= tkinter \
  16. email email/mime \
  17. ensurepip ensurepip/_bundled \
  18. html json http dbm xmlrpc \
  19. - sqlite3 \
  20. logging csv wsgiref urllib \
  21. ctypes ctypes/macholib \
  22. idlelib idlelib/Icons \
  23. @@ -1186,7 +1185,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
  24. test/test_importlib/namespace_pkgs/project3/parent/child \
  25. test/test_importlib/namespace_pkgs/module_and_namespace_package \
  26. test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
  27. - sqlite3/test \
  28. ctypes/test \
  29. idlelib/idle_test \
  30. distutils/tests \
  31. @@ -1207,6 +1205,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. ifeq (@TEST_MODULES@,yes)
  40. LIBSUBDIRS += $(TESTSUBDIRS)
  41. endif
  42. diff --git a/configure.ac b/configure.ac
  43. index 0ed6b17..aaffbd6 100644
  44. --- a/configure.ac
  45. +++ b/configure.ac
  46. @@ -2658,6 +2658,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.6.4