0021-Add-an-option-to-disable-the-tk-module.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From d0d42570e5a23c3bf559e0413ec97729fd2f9e24 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 23 Dec 2015 11:49:14 +0100
  4. Subject: [PATCH] Add an option to disable the tk 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 | 11 ++++++++---
  9. configure.ac | 9 +++++++++
  10. 2 files changed, 17 insertions(+), 3 deletions(-)
  11. diff --git a/Makefile.pre.in b/Makefile.pre.in
  12. index c822dbd..0a93c27 100644
  13. --- a/Makefile.pre.in
  14. +++ b/Makefile.pre.in
  15. @@ -1170,7 +1170,7 @@ maninstall: altmaninstall
  16. PLATDIR= @PLATDIR@
  17. MACHDEPS= $(PLATDIR)
  18. XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
  19. -LIBSUBDIRS= tkinter \
  20. +LIBSUBDIRS= \
  21. site-packages \
  22. asyncio \
  23. collections concurrent concurrent/futures encodings \
  24. @@ -1188,8 +1188,7 @@ LIBSUBDIRS= tkinter \
  25. venv venv/scripts venv/scripts/posix \
  26. curses $(MACHDEPS)
  27. -TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
  28. - test test/test_asyncio \
  29. +TESTSUBDIRS = test test/test_asyncio \
  30. test/test_email test/test_email/data \
  31. test/test_json \
  32. test/audiodata \
  33. @@ -1248,6 +1247,12 @@ LIBSUBDIRS += sqlite3
  34. TESTSUBDIRS += sqlite3/test
  35. endif
  36. +ifeq (@TK@,yes)
  37. +LIBSUBDIRS += tkinter
  38. +TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
  39. + tkinter/test/test_ttk
  40. +endif
  41. +
  42. ifeq (@TEST_MODULES@,yes)
  43. LIBSUBDIRS += $(TESTSUBDIRS)
  44. endif
  45. diff --git a/configure.ac b/configure.ac
  46. index cae12ad..787b185 100644
  47. --- a/configure.ac
  48. +++ b/configure.ac
  49. @@ -2903,6 +2903,15 @@ if test "$SQLITE3" = "no" ; then
  50. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
  51. fi
  52. +AC_SUBST(TK)
  53. +AC_ARG_ENABLE(tk,
  54. + AS_HELP_STRING([--disable-tk], [disable tk]),
  55. + [ TK="${enableval}" ], [ TK=yes ])
  56. +
  57. +if test "$TK" = "no"; then
  58. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  59. +fi
  60. +
  61. AC_SUBST(PYDOC)
  62. AC_ARG_ENABLE(pydoc,
  63. --
  64. 2.6.4