103-optional-sqlite.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Add option to disable the sqlite3 module
  2. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  4. ---
  5. Makefile.pre.in | 9 +++++++--
  6. configure.ac | 9 +++++++++
  7. 2 files changed, 16 insertions(+), 2 deletions(-)
  8. Index: b/configure.ac
  9. ===================================================================
  10. --- a/configure.ac
  11. +++ b/configure.ac
  12. @@ -2675,6 +2675,15 @@
  13. AC_CHECK_FUNCS(pthread_atfork)
  14. fi
  15. +AC_SUBST(SQLITE3)
  16. +AC_ARG_ENABLE(sqlite3,
  17. + AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
  18. + [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
  19. +
  20. +if test "$SQLITE3" = "no" ; then
  21. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
  22. +fi
  23. +
  24. AC_SUBST(PYDOC)
  25. AC_ARG_ENABLE(pydoc,
  26. Index: b/Makefile.pre.in
  27. ===================================================================
  28. --- a/Makefile.pre.in
  29. +++ b/Makefile.pre.in
  30. @@ -1147,7 +1147,6 @@
  31. email email/mime \
  32. ensurepip ensurepip/_bundled \
  33. html json http dbm xmlrpc \
  34. - sqlite3 \
  35. logging csv wsgiref urllib \
  36. ctypes ctypes/macholib \
  37. idlelib idlelib/Icons \
  38. @@ -1189,7 +1188,6 @@
  39. test/test_importlib/namespace_pkgs/project3/parent/child \
  40. test/test_importlib/namespace_pkgs/module_and_namespace_package \
  41. test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
  42. - sqlite3/test \
  43. ctypes/test \
  44. idlelib/idle_test \
  45. distutils/tests \
  46. @@ -1210,6 +1208,11 @@
  47. lib2to3/tests/data/fixers/myfixes
  48. endif
  49. +ifeq (@SQLITE3@,yes)
  50. +LIBSUBDIRS += sqlite3
  51. +TESTSUBDIRS += sqlite3/test
  52. +endif
  53. +
  54. ifeq (@TEST_MODULES@,yes)
  55. LIBSUBDIRS += $(TESTSUBDIRS)
  56. endif