kumquat-buildroot/package/python3/0013-Add-an-option-to-disable-the-curses-module.patch
Adam Duskett 36e635d2d5 package/python3: bump version to 3.12.1
Python 3.12.1 has removed distutils support. As such, we remove the distutils
option from pkg-python.mk as well.

Tested on Fedora 39, and Debian 11. All 68 package tests pass.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-06 23:21:22 +01:00

61 lines
1.6 KiB
Diff

From a295784d19553cc28e4d531c0f21ac2935b8bef9 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 22 Feb 2017 17:31:51 -0800
Subject: [PATCH] Add an option to disable the curses module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Makefile.pre.in | 5 ++++-
configure.ac | 7 +++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 8af8a3aa40b..7162d9d3634 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2093,7 +2093,6 @@ LIBSUBDIRS= asyncio \
concurrent concurrent/futures \
csv \
ctypes ctypes/macholib \
- curses \
dbm \
email email/mime \
encodings \
@@ -2246,6 +2245,10 @@ LIBSUBDIRS += tkinter
TESTSUBDIRS += test/test_tkinter test/test_ttk
endif
+ifeq (@CURSES@,yes)
+LIBSUBDIRS += curses
+endif
+
COMPILEALL_OPTS=-j0
ifeq (@PYDOC@,yes)
diff --git a/configure.ac b/configure.ac
index 7caa361138d..748a16d7eab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4497,6 +4497,13 @@ AC_ARG_ENABLE(sqlite3,
AS_IF([test "$SQLITE3" = "no"],
[PY_STDLIB_MOD_SET_NA([_sqlite3])])
+AC_SUBST(CURSES)
+AC_ARG_ENABLE(curses,
+ AS_HELP_STRING([--disable-curses], [disable curses]),
+ [ CURSES="${enableval}" ], [ CURSES=yes ])
+AS_IF([test "$CURSES" = "no"],
+ [PY_STDLIB_MOD_SET_NA([_curses], [_curses_panel])])
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.43.0