All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/gdb: remove python2 support
@ 2022-01-13 20:27 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2022-01-13 20:27 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=a607efc6d3606e862babfbd17ca8e39398f7c2a5
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Since at least gdb 7.8, python3 support has been available. As part of
the progressive retiring of python2 support, it is time to drop its
support in gdb by:

- Removing BR2_PACKAGE_HOST_GDB_PYTHON in package/gdb/Config.in.host
  and removing the choice to leave just a BR2_PACKAGE_HOST_GDB_PYTHON3
  option.

- Adding BR2_PACKAGE_HOST_GDB_PYTHON to Config.in.legacy

- Changing depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 to
  depends on BR2_PACKAGE_PYTHON3 in package/gdb/Config.in

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Config.in.legacy           |  7 +++++++
 package/gdb/Config.in      |  2 +-
 package/gdb/Config.in.host | 20 +-------------------
 package/gdb/gdb.mk         | 12 +-----------
 4 files changed, 10 insertions(+), 31 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 6c6aca5ac9..dd64b7da1b 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2022.02"
 
+config BR2_PACKAGE_HOST_GDB_PYTHON
+	bool "GDB Python2 support removed"
+	select BR2_LEGACY
+	help
+	  Python2 is deprecated and no longer supported.
+	  Please migrate to Python3.
+
 config BR2_PACKAGE_GSTREAMER1_MM
 	bool "gstreamer1-mm package removed"
 	select BR2_LEGACY
diff --git a/package/gdb/Config.in b/package/gdb/Config.in
index 6f1a883de7..daad6c910d 100644
--- a/package/gdb/Config.in
+++ b/package/gdb/Config.in
@@ -77,7 +77,7 @@ config BR2_PACKAGE_GDB_TUI
 
 config BR2_PACKAGE_GDB_PYTHON
 	bool "Python support"
-	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
+	depends on BR2_PACKAGE_PYTHON3
 	help
 	  This option enables Python support in the target gdb.
 
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index a6e1d7f53c..56999fa9e0 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -30,29 +30,11 @@ config BR2_PACKAGE_HOST_GDB_TUI
 	help
 	  This option enables terminal user interface (TUI) for gdb
 
-choice
-	prompt "Python support"
-	default BR2_PACKAGE_HOST_GDB_NOPYTHON
-	help
-	  Select the version of Python you wish to use
-
-config BR2_PACKAGE_HOST_GDB_NOPYTHON
-	bool "None"
-	help
-	  This option disables Python support in the cross gdb.
-
-config BR2_PACKAGE_HOST_GDB_PYTHON
-	bool "Python 2"
-	help
-	  This option enables the Python 2 support in the cross gdb.
-
 config BR2_PACKAGE_HOST_GDB_PYTHON3
-	bool "Python 3"
+	bool "Python support"
 	help
 	  This option enables the Python 3 support in the cross gdb.
 
-endchoice
-
 config BR2_PACKAGE_HOST_GDB_SIM
 	bool "Simulator support"
 	depends on !BR2_arc
diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 4ff498230a..05de3c14d1 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -201,17 +201,10 @@ GDB_CONF_OPTS += --disable-tui
 endif
 
 ifeq ($(BR2_PACKAGE_GDB_PYTHON),y)
-ifeq ($(BR2_PACKAGE_PYTHON3),y)
 # CONF_ENV: for top-level configure; MAKE_ENV: for sub-projects' configure.
 GDB_CONF_ENV += BR_PYTHON_VERSION=$(PYTHON3_VERSION_MAJOR)
 GDB_MAKE_ENV += BR_PYTHON_VERSION=$(PYTHON3_VERSION_MAJOR)
 GDB_DEPENDENCIES += python3
-else
-# CONF_ENV: for top-level configure; MAKE_ENV: for sub-projects' configure.
-GDB_CONF_ENV += BR_PYTHON_VERSION=$(PYTHON_VERSION_MAJOR)
-GDB_MAKE_ENV += BR_PYTHON_VERSION=$(PYTHON_VERSION_MAJOR)
-GDB_DEPENDENCIES += python
-endif
 GDB_CONF_OPTS += --with-python=$(TOPDIR)/package/gdb/gdb-python-config
 else
 GDB_CONF_OPTS += --without-python
@@ -287,10 +280,7 @@ else
 HOST_GDB_CONF_OPTS += --disable-tui
 endif
 
-ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y)
-HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python2
-HOST_GDB_DEPENDENCIES += host-python
-else ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON3),y)
+ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON3),y)
 HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python3
 HOST_GDB_DEPENDENCIES += host-python3
 else
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-13 20:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 20:27 [Buildroot] [git commit] package/gdb: remove python2 support Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.