Skip to contentSkip to conversation

package/python3: add the configuration to support python curses

PATCH Applied Charles Hardin 2 participants 2 messages Aug 25, 2023 – Dec 24, 2023

lore
Share & tools
lore
#0 lore raw

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

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

---
 package/python3/Config.in.host | 5 +++++
 package/python3/python3.mk     | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
package/python3/Config.in.host +5 -0
index 77d608bdc0..88c286c55b 100644
@@ -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
package/python3/python3.mk +6 -1
index bdb7cfd22f..8d88a825e6 100644
@@ -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
Signature · 6 lines
2.39.2 (Apple Git-143)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · On Fri, 25 Aug 2023 12:56:35 -0700 Charles Hardin <[email protected]> wrote:

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

---
 package/python3/Config.in.host | 5 +++++
 package/python3/python3.mk     | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot