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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. [aduskett@gmail.com: Update for python 3.6.4]
  10. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  11. ---
  12. Makefile.pre.in | 7 +++++--
  13. configure.ac | 9 +++++++++
  14. 2 files changed, 14 insertions(+), 2 deletions(-)
  15. diff --git a/Makefile.pre.in b/Makefile.pre.in
  16. index dc1e917cc3..6a6bc082cd 100644
  17. --- a/Makefile.pre.in
  18. +++ b/Makefile.pre.in
  19. @@ -1245,8 +1245,7 @@ LIBSUBDIRS= site-packages \
  20. turtledemo \
  21. multiprocessing multiprocessing/dummy \
  22. unittest \
  23. - venv venv/scripts venv/scripts/common venv/scripts/posix \
  24. - curses
  25. + venv venv/scripts venv/scripts/common venv/scripts/posix
  26. TESTSUBDIRS= test \
  27. test/audiodata \
  28. @@ -1302,6 +1301,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
  29. tkinter/test/test_ttk
  30. endif
  31. +ifeq (@CURSES@,yes)
  32. +LIBSUBDIRS += curses
  33. +endif
  34. +
  35. ifeq (@LIB2TO3@,yes)
  36. LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
  37. TESTSUBDIRS += lib2to3/tests \
  38. diff --git a/configure.ac b/configure.ac
  39. index 6a56a5b0c1..5896b39ff9 100644
  40. --- a/configure.ac
  41. +++ b/configure.ac
  42. @@ -3130,6 +3130,15 @@ if test "$TK" = "no"; then
  43. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  44. fi
  45. +AC_SUBST(CURSES)
  46. +AC_ARG_ENABLE(curses,
  47. + AS_HELP_STRING([--disable-curses], [disable curses]),
  48. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  49. +
  50. +if test "$CURSES" = "no"; then
  51. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
  52. +fi
  53. +
  54. AC_SUBST(PYDOC)
  55. AC_ARG_ENABLE(pydoc,
  56. --
  57. 2.13.5