[Buildroot] [PATCH 1/1] package/python3: add the configuration to support python curses

Charles Hardin ckhardin at gmail.com
Fri Aug 25 19:56:35 UTC 2023


Working on another project with the buildroot sdk and there
was a python configuration script that could be started from
the build which required the curses module. So, instead of
switching python interpreters just add an option to be compile
with the curses module for the host-python

Signed-off-by: Charles Hardin <ckhardin at gmail.com>
---
 package/python3/Config.in.host | 5 +++++
 package/python3/python3.mk     | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/package/python3/Config.in.host b/package/python3/Config.in.host
index 77d608bdc0..88c286c55b 100644
--- a/package/python3/Config.in.host
+++ b/package/python3/Config.in.host
@@ -12,6 +12,11 @@ config BR2_PACKAGE_HOST_PYTHON3_BZIP2
 	help
 	  bz2 module for host Python3.
 
+config BR2_PACKAGE_HOST_PYTHON3_CURSES
+	bool "curses"
+	help
+	  curses module for host Python3.
+
 config BR2_PACKAGE_HOST_PYTHON3_SSL
 	bool "ssl"
 	select BR2_PACKAGE_HOST_OPENSSL
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index bdb7cfd22f..8d88a825e6 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -25,7 +25,6 @@ HOST_PYTHON3_CONF_OPTS += \
 	--disable-sqlite3 \
 	--disable-tk \
 	--with-expat=system \
-	--disable-curses \
 	--disable-codecs-cjk \
 	--disable-nis \
 	--enable-unicodedata \
@@ -58,6 +57,12 @@ else
 HOST_PYTHON3_CONF_OPTS += --disable-bzip2
 endif
 
+ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y)
+HOST_PYTHON3_DEPENDENCIES += host-ncurses
+else
+HOST_PYTHON3_CONF_OPTS += --disable-curses
+endif
+
 ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
 HOST_PYTHON3_DEPENDENCIES += host-openssl
 else
-- 
2.39.2 (Apple Git-143)




More information about the buildroot mailing list