0018-Add-an-option-to-disable-the-curses-module.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From 404aad42698c6d5cbd78421720f9a2bc0e8ec9fe Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 22 Feb 2017 17:31:51 -0800
  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. [ Andrey Smirnov: ported to Python 3.6 ]
  8. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
  9. ---
  10. Makefile.pre.in | 7 +++++--
  11. configure.ac | 9 +++++++++
  12. 2 files changed, 14 insertions(+), 2 deletions(-)
  13. diff --git a/Makefile.pre.in b/Makefile.pre.in
  14. index dc1e917cc3..6a6bc082cd 100644
  15. --- a/Makefile.pre.in
  16. +++ b/Makefile.pre.in
  17. @@ -1278,8 +1278,7 @@ LIBSUBDIRS= site-packages \
  18. turtledemo \
  19. multiprocessing multiprocessing/dummy \
  20. unittest \
  21. - venv venv/scripts venv/scripts/common venv/scripts/posix \
  22. - curses
  23. + venv venv/scripts venv/scripts/common venv/scripts/posix
  24. TESTSUBDIRS= test \
  25. test/audiodata \
  26. @@ -1351,6 +1350,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
  27. tkinter/test/test_ttk
  28. endif
  29. +ifeq (@CURSES@,yes)
  30. +LIBSUBDIRS += curses
  31. +endif
  32. +
  33. ifeq (@LIB2TO3@,yes)
  34. LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
  35. TESTSUBDIRS += lib2to3/tests \
  36. diff --git a/configure.ac b/configure.ac
  37. index 6a56a5b0c1..5896b39ff9 100644
  38. --- a/configure.ac
  39. +++ b/configure.ac
  40. @@ -3244,6 +3244,15 @@ if test "$TK" = "no"; then
  41. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  42. fi
  43. +AC_SUBST(CURSES)
  44. +AC_ARG_ENABLE(curses,
  45. + AS_HELP_STRING([--disable-curses], [disable curses]),
  46. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  47. +
  48. +if test "$CURSES" = "no"; then
  49. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
  50. +fi
  51. +
  52. AC_SUBST(PYDOC)
  53. AC_ARG_ENABLE(pydoc,
  54. --
  55. 2.13.5