2
1

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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 962deb43f5f340a8472d432ae8e6d61186f9040e 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 | 5 ++++-
  11. configure.ac | 9 +++++++++
  12. 2 files changed, 13 insertions(+), 1 deletion(-)
  13. diff --git a/Makefile.pre.in b/Makefile.pre.in
  14. index dc84384680..2a82f3308f 100644
  15. --- a/Makefile.pre.in
  16. +++ b/Makefile.pre.in
  17. @@ -1405,7 +1405,6 @@ LIBSUBDIRS= site-packages \
  18. multiprocessing multiprocessing/dummy \
  19. unittest \
  20. venv venv/scripts venv/scripts/common venv/scripts/posix \
  21. - curses \
  22. zoneinfo
  23. TESTSUBDIRS= test \
  24. @@ -1485,6 +1484,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
  25. tkinter/test/test_ttk
  26. endif
  27. +ifeq (@CURSES@,yes)
  28. +LIBSUBDIRS += curses
  29. +endif
  30. +
  31. ifeq (@LIB2TO3@,yes)
  32. LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
  33. TESTSUBDIRS += lib2to3/tests \
  34. diff --git a/configure.ac b/configure.ac
  35. index 4c72dae960..acd98381a3 100644
  36. --- a/configure.ac
  37. +++ b/configure.ac
  38. @@ -3347,6 +3347,15 @@ if test "$TK" = "no"; then
  39. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
  40. fi
  41. +AC_SUBST(CURSES)
  42. +AC_ARG_ENABLE(curses,
  43. + AS_HELP_STRING([--disable-curses], [disable curses]),
  44. + [ CURSES="${enableval}" ], [ CURSES=yes ])
  45. +
  46. +if test "$CURSES" = "no"; then
  47. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
  48. +fi
  49. +
  50. AC_SUBST(PYDOC)
  51. AC_ARG_ENABLE(pydoc,
  52. --
  53. 2.25.1