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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From d843bceff915b2a50b36a9db8552e0db5bd90f6d 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. [ Adam Duskett: ported to Python 3.10.0 ]
  10. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  11. ---
  12. Makefile.pre.in | 4 +++-
  13. configure.ac | 9 +++++++++
  14. 2 files changed, 12 insertions(+), 1 deletion(-)
  15. diff --git a/Makefile.pre.in b/Makefile.pre.in
  16. index 6ab184fe5f8..09408c3471f 100644
  17. --- a/Makefile.pre.in
  18. +++ b/Makefile.pre.in
  19. @@ -1918,7 +1918,6 @@ LIBSUBDIRS= asyncio \
  20. concurrent concurrent/futures \
  21. csv \
  22. ctypes ctypes/macholib \
  23. - curses \
  24. dbm \
  25. distutils distutils/command \
  26. email email/mime \
  27. @@ -2084,6 +2083,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
  28. tkinter/test/test_ttk
  29. endif
  30. +ifeq (@CURSES@,yes)
  31. +LIBSUBDIRS += curses
  32. +endif
  33. TEST_MODULES=@TEST_MODULES@
  34. libinstall: all $(srcdir)/Modules/xxmodule.c
  35. diff --git a/configure.ac b/configure.ac
  36. index 342b295bcdd..5d52c813ba6 100644
  37. --- a/configure.ac
  38. +++ b/configure.ac
  39. @@ -4240,6 +4240,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.44.0