0021-Add-an-option-to-disable-the-curses-module.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From 3e51eef24c51b986c37b354f3de98218eb76909c Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 7 Mar 2017 22:29:06 +0100
  4. Subject: [PATCH] Add an option to disable the curses module
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  7. [Peter: update for 2.7.16]
  8. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  9. ---
  10. Makefile.pre.in | 6 +++++-
  11. configure.ac | 9 +++++++++
  12. 2 files changed, 14 insertions(+), 1 deletion(-)
  13. diff --git a/Makefile.pre.in b/Makefile.pre.in
  14. index 37ed70ab1d..458f4ad55b 100644
  15. --- a/Makefile.pre.in
  16. +++ b/Makefile.pre.in
  17. @@ -1060,7 +1060,7 @@ LIBSUBDIRS= site-packages \
  18. multiprocessing multiprocessing/dummy \
  19. unittest \
  20. lib-old \
  21. - curses $(MACHDEPS)
  22. + $(MACHDEPS)
  23. TESTSUBDIRS = test test/audiodata test/capath test/data \
  24. test/cjkencodings test/decimaltestdata test/xmltestdata \
  25. @@ -1103,6 +1103,10 @@ TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
  26. lib-tk/test/test_ttk
  27. endif
  28. +ifeq (@CURSES@,yes)
  29. +LIBSUBDIRS += curses
  30. +endif
  31. +
  32. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  33. @for i in $(SCRIPTDIR) $(LIBDEST); \
  34. do \
  35. diff --git a/configure.ac b/configure.ac
  36. index 2c20f826c5..a7ebcd091e 100644
  37. --- a/configure.ac
  38. +++ b/configure.ac
  39. @@ -2852,6 +2852,15 @@ if test "$TK" = "no"; then
  40. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  41. fi
  42. +AC_SUBST(CURSES)
  43. +AC_ARG_ENABLE(curses,
  44. + AS_HELP_STRING([--disable-curses], [disable curses]),
  45. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  46. +
  47. +if test "$CURSES" = "no"; then
  48. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
  49. +fi
  50. +
  51. AC_SUBST(PYDOC)
  52. AC_ARG_ENABLE(pydoc,
  53. --
  54. 2.11.0