From patchwork Sat Feb 12 05:42:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 1591966 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=oQOMWq+7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JwfXK2yzjz9sCD for ; Sat, 12 Feb 2022 16:42:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C38D283EAD; Sat, 12 Feb 2022 05:42:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4VSiwflvNRiS; Sat, 12 Feb 2022 05:42:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 78E9B83EAF; Sat, 12 Feb 2022 05:42:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 07E1B1BF867 for ; Sat, 12 Feb 2022 05:42:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E83D34019F for ; Sat, 12 Feb 2022 05:42:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pIuOOph6GD0p for ; Sat, 12 Feb 2022 05:42:47 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by smtp2.osuosl.org (Postfix) with ESMTPS id 17E5740017 for ; Sat, 12 Feb 2022 05:42:47 +0000 (UTC) Received: by mail-il1-x12a.google.com with SMTP id f13so8448053ilq.5 for ; Fri, 11 Feb 2022 21:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IE5sghbDxJVNISB6AtIhg/L8dhwxxl9gbBaa8XaIOrA=; b=oQOMWq+7sYQmWhXU/EOAW1wN/IXHggSeLGbA02iOyuW1nDj/J63B3ou7hKDOktc2nJ tg2F6Yf2iW9jV/jYW4SkdaCRZOfqt1Tv6bs6QFwRzV42KekLbaJbS0n2NbYajNVXwBDd vfEGOfkSJ3PGyukaWkGjmFjDe/YSDndTbVvPPVAbkwjPh8AL/7d+9jTIA/GpfJ49xeoT q5jQFl8YON4dZ9/PCbndqEgDozRXN1FJuQylMAVcb7rAZLj5eTnVb7utAqRPA0Et99N/ OZQT9b/UT9I398MlaOkhHuLfWFpOxelwtEw9f+CxrBGWGxq3Tmd4wyTH3yAeYpwDdvMM OGAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IE5sghbDxJVNISB6AtIhg/L8dhwxxl9gbBaa8XaIOrA=; b=JEtGjxkKpx3QrkodsrkZ+gJ3bgk0PCU4b0Kv3XOaN5vpaCnSKoO8tBQhghO6PeGpCj AWwewEKfLoW0TKLg7KOla0YZ3pq2jvr/dYtzBb4e+ncjCcu8PFy9eviNvS6zpCgtNr5P 3U7WMzYlXdvpyqYDLkQKhxhwu79ruN78ubDEtF/oagEHOqCxi8TMaRoNvs/HNZqFwvs9 AquOdlFcXEtfBeiRgl7jOQ7odTJTlBOf48+ctXP+c1F96zTDGilJfFZBeUTGUYevczIb JHbOBELTPjrmSkrHnm3y9zPnwrv01ft5gU9+0X1SkmE2ge2mCJRmIYN/dI7M5KqEQ7Wf /Uig== X-Gm-Message-State: AOAM532unH5YynOHtdlANIsGKGud4LZagHLTDcmTDh0quNNYv/tKcp6V iKq6+vgxvypyhptrDe3RuSfVDH6HBhM= X-Google-Smtp-Source: ABdhPJztMdAEKxjDCVhriLRfSwTv7MtZnIqWlEmwoUPPdKq/vcY1FYHIs2yrAWwpEHrigFIJYq2Tzw== X-Received: by 2002:a92:ca4b:: with SMTP id q11mr107809ilo.260.1644644565737; Fri, 11 Feb 2022 21:42:45 -0800 (PST) Received: from james-x399.localdomain (97-118-156-98.hlrn.qwest.net. [97.118.156.98]) by smtp.gmail.com with ESMTPSA id n12sm14167930ili.69.2022.02.11.21.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 21:42:45 -0800 (PST) From: James Hilliard To: buildroot@buildroot.org Date: Fri, 11 Feb 2022 22:42:27 -0700 Message-Id: <20220212054227.1207008-1-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/pkg-python: drop python2 host/setuptools support X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci , Asaf Kahlon , Paul Cercueil , James Hilliard , Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Drop conditonal python version handling now that python2 has been removed. Remove python3-setuptools and replace usage with python3 only python-setuptools. Signed-off-by: James Hilliard --- 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 diff --git a/package/libapparmor/libapparmor.mk b/package/libapparmor/libapparmor.mk index f3d744e3e7..7bb849ab94 100644 --- a/package/libapparmor/libapparmor.mk +++ b/package/libapparmor/libapparmor.mk @@ -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 \ diff --git a/package/libiio/libiio.mk b/package/libiio/libiio.mk index 48e2f385e3..9464a44ae7 100644 --- a/package/libiio/libiio.mk +++ b/package/libiio/libiio.mk @@ -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 diff --git a/package/lirc-tools/lirc-tools.mk b/package/lirc-tools/lirc-tools.mk index 27aa5b97cc..05f20f5726 100644 --- a/package/lirc-tools/lirc-tools.mk +++ b/package/lirc-tools/lirc-tools.mk @@ -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 diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 00bdb9150a..bf0649fc9c 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -150,86 +150,24 @@ endif # Target packages need both the python interpreter on the target (for # runtime) and the python interpreter on the host (for # compilation). However, host packages only need the python -# interpreter on the host, whose version may be enforced by setting -# the *_NEEDS_HOST_PYTHON variable. -# -# So: -# - for target packages, we always depend on the default python interpreter -# (the one selected by the config); -# - for host packages: -# - if *_NEEDS_HOST_PYTHON is not set, then we use the default -# interpreter; -# - otherwise, we depend on the one requested by *_NEEDS_HOST_PYTHON. +# interpreter on the host. # ifeq ($(4),target) -$(2)_DEPENDENCIES += $$(if $$(BR2_PACKAGE_PYTHON3),host-python3 python3,host-python python) -else -ifeq ($$($(2)_NEEDS_HOST_PYTHON),) -$(2)_DEPENDENCIES += $$(if $$(BR2_PACKAGE_PYTHON3),host-python3,host-python) +$(2)_DEPENDENCIES += host-python3 python3 else -ifeq ($$($(2)_NEEDS_HOST_PYTHON),python2) -$(2)_DEPENDENCIES += host-python -else ifeq ($$($(2)_NEEDS_HOST_PYTHON),python3) $(2)_DEPENDENCIES += host-python3 -else -$$(error Incorrect value '$$($(2)_NEEDS_HOST_PYTHON)' for $(2)_NEEDS_HOST_PYTHON) -endif -endif # ($$($(2)_NEEDS_HOST_PYTHON),) endif # ($(4),target) # Setuptools based packages will need setuptools for the host Python # interpreter (both host and target). # -# If we have a host package that says "I need Python 3", we install -# setuptools for python3. -# -# If we have a host packge that says "I need Python 2", we install -# setuptools for python2. -# -# If we have a target package, or a host package that doesn't have any -# _NEEDS_HOST_PYTHON, and BR2_PACKAGE_PYTHON3 is used, then -# Python 3.x is the default Python interpreter, so we install -# setuptools for python3. -# -# In all other cases, we install setuptools for python2. Those other -# cases are: a target package or host package with -# BR2_PACKAGE_PYTHON=y, or a host-package with neither -# BR2_PACKAGE_PYTHON3=y or BR2_PACKAGE_PYTHON=y. ifeq ($$($(2)_SETUP_TYPE),setuptools) -ifeq ($(4):$$($(2)_NEEDS_HOST_PYTHON),host:python3) -$(2)_DEPENDENCIES += $$(if $$(filter host-python3-setuptools,$(1)),,host-python3-setuptools) -else ifeq ($(4):$$($(2)_NEEDS_HOST_PYTHON),host:python2) -$(2)_DEPENDENCIES += $$(if $$(filter host-python-setuptools,$(1)),,host-python-setuptools) -else ifeq ($$(BR2_PACKAGE_PYTHON3),y) -$(2)_DEPENDENCIES += $$(if $$(filter host-python3-setuptools,$(1)),,host-python3-setuptools) -else $(2)_DEPENDENCIES += $$(if $$(filter host-python-setuptools,$(1)),,host-python-setuptools) -endif endif # SETUP_TYPE # Python interpreter to use for building the package. # -# We may want to specify the python interpreter to be used for building a -# package, especially for host-packages (target packages must be built using -# the same version of the interpreter as the one installed on the target). -# -# So: -# - for target packages, we always use the default python interpreter (which -# is the same version as the one built and installed on the target); -# - for host packages: -# - if *_NEEDS_HOST_PYTHON is not set, then we use the default -# interpreter; -# - otherwise, we use the one requested by *_NEEDS_HOST_PYTHON. -# -ifeq ($(4),target) $(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python -else -ifeq ($$($(2)_NEEDS_HOST_PYTHON),) -$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python -else -$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/$$($(2)_NEEDS_HOST_PYTHON) -endif -endif # # Build step. Only define it if not already defined by the package .mk diff --git a/package/python-setuptools/60.7.0/0001-add-executable.patch b/package/python-setuptools/0001-add-executable.patch similarity index 100% rename from package/python-setuptools/60.7.0/0001-add-executable.patch rename to package/python-setuptools/0001-add-executable.patch diff --git a/package/python-setuptools/44.0.0/0001-add-executable.patch b/package/python-setuptools/44.0.0/0001-add-executable.patch deleted file mode 100644 index 8a59f5a4d8..0000000000 --- a/package/python-setuptools/44.0.0/0001-add-executable.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 9b3d307f8f6a1af88f3f810f5a6cf0835830e1e8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Krause?= -Date: Mon, 7 Dec 2015 01:14:33 +0100 -Subject: [PATCH] add executable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add a new --executable option to distribute so that we can -force the shebang line in installed python scripts. - -[Thomas: refresh for setuptools 5.8.] -[Jörg: refresh for setuptools 18.7.1] - -Signed-off-by: Gustavo Zacarias -Signed-off-by: Thomas Petazzoni -Signed-off-by: Jörg Krause ---- - setuptools/command/install.py | 2 ++ - setuptools/command/install_scripts.py | 9 +++++++++ - 2 files changed, 11 insertions(+) - -diff --git a/setuptools/command/install.py b/setuptools/command/install.py -index d2bca2e..b60ef19 100644 ---- a/setuptools/command/install.py -+++ b/setuptools/command/install.py -@@ -16,6 +16,7 @@ class install(orig.install): - """Use easy_install to install the package, w/dependencies""" - - user_options = orig.install.user_options + [ -+ ('executable=', 'e', "specify final destination interpreter path"), - ('old-and-unmanageable', None, "Try not to use this!"), - ('single-version-externally-managed', None, - "used by system package builders to create 'flat' eggs"), -@@ -31,6 +32,7 @@ class install(orig.install): - - def initialize_options(self): - orig.install.initialize_options(self) -+ self.executable = None - self.old_and_unmanageable = None - self.single_version_externally_managed = None - -diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py -index be66cb2..07afaf8 100755 ---- a/setuptools/command/install_scripts.py -+++ b/setuptools/command/install_scripts.py -@@ -11,6 +11,13 @@ class install_scripts(orig.install_scripts): - def initialize_options(self): - orig.install_scripts.initialize_options(self) - self.no_ep = False -+ self.executable = None -+ -+ def finalize_options(self): -+ orig.install_scripts.finalize_options(self) -+ self.set_undefined_options('install', -+ ('executable','executable') -+ ) - - def run(self): - import setuptools.command.easy_install as ei -@@ -31,6 +38,8 @@ class install_scripts(orig.install_scripts): - ) - bs_cmd = self.get_finalized_command('build_scripts') - exec_param = getattr(bs_cmd, 'executable', None) -+ if self.executable is not None: -+ exec_param = self.executable - bw_cmd = self.get_finalized_command("bdist_wininst") - is_wininst = getattr(bw_cmd, '_is_running', False) - writer = ei.ScriptWriter --- -2.6.3 - diff --git a/package/python-setuptools/44.0.0/python-setuptools.hash b/package/python-setuptools/44.0.0/python-setuptools.hash deleted file mode 100644 index 769b68c35d..0000000000 --- a/package/python-setuptools/44.0.0/python-setuptools.hash +++ /dev/null @@ -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 diff --git a/package/python-setuptools/60.7.0/python-setuptools.hash b/package/python-setuptools/python-setuptools.hash similarity index 100% rename from package/python-setuptools/60.7.0/python-setuptools.hash rename to package/python-setuptools/python-setuptools.hash diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk index 04b872fb79..584f83f7a0 100644 --- a/package/python-setuptools/python-setuptools.mk +++ b/package/python-setuptools/python-setuptools.mk @@ -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)) diff --git a/package/python3-setuptools/0001-add-executable.patch b/package/python3-setuptools/0001-add-executable.patch deleted file mode 120000 index 46b5935d33..0000000000 --- a/package/python3-setuptools/0001-add-executable.patch +++ /dev/null @@ -1 +0,0 @@ -../python-setuptools/60.7.0/0001-add-executable.patch \ No newline at end of file diff --git a/package/python3-setuptools/python3-setuptools.hash b/package/python3-setuptools/python3-setuptools.hash deleted file mode 120000 index 2c9d3614d5..0000000000 --- a/package/python3-setuptools/python3-setuptools.hash +++ /dev/null @@ -1 +0,0 @@ -../python-setuptools/60.7.0/python-setuptools.hash \ No newline at end of file diff --git a/package/python3-setuptools/python3-setuptools.mk b/package/python3-setuptools/python3-setuptools.mk deleted file mode 100644 index d5aaa01918..0000000000 --- a/package/python3-setuptools/python3-setuptools.mk +++ /dev/null @@ -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))