Skip to contentSkip to conversation

package/pkg-python: drop python2 host/setuptools support

PATCH In review James Hilliard 2 participants 2 messages Feb 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-python: drop python2 host/setuptools support

Drop conditonal python version handling now that python2 has been removed.

Remove python3-setuptools and replace usage with python3 only python-setuptools.

---
 package/libapparmor/libapparmor.mk            |  2 +-
 package/libiio/libiio.mk                      |  2 +-
 package/lirc-tools/lirc-tools.mk              |  2 +-
 package/pkg-python.mk                         | 66 +----------------
 .../{60.7.0 => }/0001-add-executable.patch    |  0
 .../44.0.0/0001-add-executable.patch          | 72 -------------------
 .../44.0.0/python-setuptools.hash             |  4 --
 .../{60.7.0 => }/python-setuptools.hash       |  0
 .../python-setuptools/python-setuptools.mk    | 17 +----
 .../0001-add-executable.patch                 |  1 -
 .../python3-setuptools.hash                   |  1 -
 .../python3-setuptools/python3-setuptools.mk  | 20 ------
 12 files changed, 6 insertions(+), 181 deletions(-)
 rename package/python-setuptools/{60.7.0 => }/0001-add-executable.patch (100%)
 delete mode 100644 package/python-setuptools/44.0.0/0001-add-executable.patch
 delete mode 100644 package/python-setuptools/44.0.0/python-setuptools.hash
 rename package/python-setuptools/{60.7.0 => }/python-setuptools.hash (100%)
 delete mode 120000 package/python3-setuptools/0001-add-executable.patch
 delete mode 120000 package/python3-setuptools/python3-setuptools.hash
 delete mode 100644 package/python3-setuptools/python3-setuptools.mk
package/libapparmor/libapparmor.mk +1 -1
index f3d744e3e7..7bb849ab94 100644
@@ -28,7 +28,7 @@ LIBAPPARMOR_CONF_OPTS = \
 	--disable-man-pages
 
 ifeq ($(BR2_PACKAGE_PYTHON3),y)
-LIBAPPARMOR_DEPENDENCIES += host-python3 host-python3-setuptools host-swig python3
+LIBAPPARMOR_DEPENDENCIES += host-python3 host-python-setuptools host-swig python3
 LIBAPPARMOR_CONF_OPTS += \
 	--with-python \
 	PYTHON=$(HOST_DIR)/usr/bin/python3 \
package/libiio/libiio.mk +1 -1
index 48e2f385e3..9464a44ae7 100644
@@ -73,7 +73,7 @@ LIBIIO_CONF_OPTS += -DHAVE_DNS_SD=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
-LIBIIO_DEPENDENCIES += host-python3-setuptools python3
+LIBIIO_DEPENDENCIES += host-python-setuptools python3
 LIBIIO_CONF_OPTS += \
 	-DPYTHON_BINDINGS=ON
 	-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3
package/lirc-tools/lirc-tools.mk +1 -1
index 27aa5b97cc..05f20f5726 100644
@@ -47,7 +47,7 @@ LIRC_TOOLS_DEPENDENCIES += libftdi1
 endif
 
 ifeq ($(BR2_PACKAGE_PYTHON3),y)
-LIRC_TOOLS_DEPENDENCIES += python3 host-python3-setuptools
+LIRC_TOOLS_DEPENDENCIES += python3 host-python-setuptools
 LIRC_TOOLS_MAKE_ENV += SETUPTOOLS_ENV='$(PKG_PYTHON_SETUPTOOLS_ENV)'
 endif
 
package/pkg-python.mk +2 -64

88 lines not on this page · raw message

package/python-setuptools/0001-add-executable.patch renamed from package/python-setuptools/60.7.0/0001-add-executable.patch +0 -0
similarity index 100%
rename from package/python-setuptools/60.7.0/0001-add-executable.patch
rename to package/python-setuptools/0001-add-executable.patch
package/python-setuptools/44.0.0/0001-add-executable.patch deleted +0 -72

72 lines not on this page · raw message

package/python-setuptools/44.0.0/python-setuptools.hash deleted +0 -4
deleted file mode 100644
index 769b68c35d..0000000000
@@ -1,4 +0,0 @@
-# From https://pypi.org/pypi/setuptools/json
-md5  32b6cdce670ce462086d246bea181e9d  setuptools-44.0.0.zip
-sha256  e5baf7723e5bb8382fc146e33032b241efc63314211a3a120aaa55d62d2bb008  setuptools-44.0.0.zip
-sha256  c32a3ac395af6321efd28be73d06a00f0db6ab887d1c21d4fec46128d2056d5a  LICENSE
package/python-setuptools/python-setuptools.hash renamed from package/python-setuptools/60.7.0/python-setuptools.hash +0 -0
similarity index 100%
rename from package/python-setuptools/60.7.0/python-setuptools.hash
rename to package/python-setuptools/python-setuptools.hash
package/python-setuptools/python-setuptools.mk +1 -16
index 04b872fb79..584f83f7a0 100644
@@ -4,29 +4,14 @@
 #
 ################################################################################
 
-# Please keep in sync with
-# package/python3-setuptools/python3-setuptools.mk
 PYTHON_SETUPTOOLS_VERSION = 60.7.0
-PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON3_SETUPTOOLS_VERSION).tar.gz
+PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz
 PYTHON_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/29/dd/48d662bb93e5e51e72265ef612f869947d4ae4126328d7156824cd50d440
-
-# The host variant is only for Python 2.x, so we need to use 44.0.0.
-HOST_PYTHON_SETUPTOOLS_VERSION = 44.0.0
-HOST_PYTHON_SETUPTOOLS_SOURCE = setuptools-$(HOST_PYTHON_SETUPTOOLS_VERSION).zip
-HOST_PYTHON_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/b0/f3/44da7482ac6da3f36f68e253cb04de37365b3dba9036a3c70773b778b485
-HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON = python2
-
 PYTHON_SETUPTOOLS_LICENSE = MIT
 PYTHON_SETUPTOOLS_LICENSE_FILES = LICENSE
 PYTHON_SETUPTOOLS_CPE_ID_VENDOR = python
 PYTHON_SETUPTOOLS_CPE_ID_PRODUCT = setuptools
 PYTHON_SETUPTOOLS_SETUP_TYPE = setuptools
 
-define HOST_PYTHON_SETUPTOOLS_EXTRACT_CMDS
-	$(UNZIP) -d $(@D) $(HOST_PYTHON_SETUPTOOLS_DL_DIR)/$(HOST_PYTHON_SETUPTOOLS_SOURCE)
-	mv $(@D)/setuptools-$(HOST_PYTHON_SETUPTOOLS_VERSION)/* $(@D)
-	$(RM) -r $(@D)/setuptools-$(HOST_PYTHON_SETUPTOOLS_VERSION)
-endef
-
 $(eval $(python-package))
 $(eval $(host-python-package))
package/python3-setuptools/0001-add-executable.patch deleted +0 -1
deleted file mode 120000
index 46b5935d33..0000000000
@@ -1 +0,0 @@
-../python-setuptools/60.7.0/0001-add-executable.patch
\ No newline at end of file
package/python3-setuptools/python3-setuptools.hash deleted +0 -1
deleted file mode 120000
index 2c9d3614d5..0000000000
@@ -1 +0,0 @@
-../python-setuptools/60.7.0/python-setuptools.hash
\ No newline at end of file
package/python3-setuptools/python3-setuptools.mk deleted +0 -20
deleted file mode 100644
index d5aaa01918..0000000000
@@ -1,20 +0,0 @@
-################################################################################
-#
-# python3-setuptools
-#
-################################################################################
-
-# Please keep in sync with
-# package/python-setuptools/python-setuptools.mk
-PYTHON3_SETUPTOOLS_VERSION = 60.7.0
-PYTHON3_SETUPTOOLS_SOURCE = setuptools-$(PYTHON3_SETUPTOOLS_VERSION).tar.gz
-PYTHON3_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/29/dd/48d662bb93e5e51e72265ef612f869947d4ae4126328d7156824cd50d440
-PYTHON3_SETUPTOOLS_LICENSE = MIT
-PYTHON3_SETUPTOOLS_LICENSE_FILES = LICENSE
-PYTHON3_SETUPTOOLS_CPE_ID_VENDOR = python
-PYTHON3_SETUPTOOLS_CPE_ID_PRODUCT = setuptools
-PYTHON3_SETUPTOOLS_SETUP_TYPE = setuptools
-HOST_PYTHON3_SETUPTOOLS_DL_SUBDIR = python-setuptools
-HOST_PYTHON3_SETUPTOOLS_NEEDS_HOST_PYTHON = python3
-
-$(eval $(host-python-package))
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"James" == James Hilliard <[email protected]> writes:

Drop conditonal python version handling now that python2 has been removed.

Remove python3-setuptools and replace usage with python3 only python-setuptools.

Committed, thanks.

I will send a patch to also update the documentation.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot