103-optional-sqlite.patch 1.5 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 | 24 +++++++++++++++++-------
  6. configure.in | 9 +++++++++
  7. 2 file changed, 9 insertions(+)
  8. Index: b/configure.ac
  9. ===================================================================
  10. --- a/configure.ac
  11. +++ b/configure.ac
  12. @@ -2633,6 +2633,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. @@ -965,7 +965,6 @@
  31. email email/mime \
  32. ensurepip ensurepip/_bundled \
  33. json \
  34. - sqlite3 \
  35. logging bsddb csv importlib wsgiref \
  36. ctypes ctypes/macholib \
  37. idlelib idlelib/Icons \
  38. @@ -983,7 +982,6 @@
  39. test/tracedmodules \
  40. email/test email/test/data \
  41. json/tests \
  42. - sqlite3/test \
  43. bsddb/test \
  44. ctypes/test \
  45. idlelib/idle_test \
  46. @@ -1006,6 +1004,11 @@
  47. lib2to3/tests/data/fixers/myfixes
  48. endif
  49. +ifeq (@SQLITE3@,yes)
  50. +LIBSUBDIRS += sqlite3
  51. +TESTSUBDIRS += sqlite3/test
  52. +endif
  53. +
  54. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  55. @for i in $(SCRIPTDIR) $(LIBDEST); \
  56. do \