All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@buildroot.org
Cc: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>,
	Samuel Martin <s.martin49@gmail.com>,
	Philippe Proulx <eeppeliteloop@gmail.com>,
	Asaf Kahlon <asafka7@gmail.com>,
	Matt Weber <matthew.weber@collins.com>,
	Julien Olivain <ju.o@free.fr>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Mauro Condarelli <mc5686@mclink.it>,
	Oli Vogt <oli.vogt.pub01@gmail.com>,
	Adam Duskett <aduskett@gmail.com>
Subject: [Buildroot] [PATCH 19/20] package/python-setuptools: bump to version 58.2.0 and split python2 version
Date: Sat,  9 Oct 2021 13:55:22 -0700	[thread overview]
Message-ID: <20211009205523.3137859-20-aduskett@gmail.com> (raw)
In-Reply-To: <20211009205523.3137859-1-aduskett@gmail.com>

Python setuptools 44.0 is not compatible with python 3.10. Unfortunately,
python-setuptools 58.2.0 is not compatible with python2. As Buildroot is not
ready to end supporting python2, the python-setuptools package must accommodate
both the old version for python2 and the new version for python3.10.

Changes include:
 - Add two new directories: package/python-setuptools/44.0.0 and
   package/python-setuptools/58.2.0
 - Add the appropriate patch and hash files to each directory.
 - Modify python-setuptools.mk to support both setuptools 44.0 and 58.2.0
   (setuptools 58.2.0 does not have a .zip on pypi anymore, only a tar.gz)
 - Point the symlinks in package/python3-setuptools to the files in
   package/python-setuptools/58.2.0/

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 .../{ => 44.0.0}/0001-add-executable.patch    |  0
 .../{ => 44.0.0}/python-setuptools.hash       |  0
 .../58.2.0/0001-add-executable.patch          | 72 +++++++++++++++++++
 .../58.2.0/python-setuptools.hash             |  4 ++
 .../python-setuptools/python-setuptools.mk    | 13 +++-
 .../0001-add-executable.patch                 |  2 +-
 .../python3-setuptools.hash                   |  2 +-
 .../python3-setuptools/python3-setuptools.mk  | 14 ++--
 8 files changed, 93 insertions(+), 14 deletions(-)
 rename package/python-setuptools/{ => 44.0.0}/0001-add-executable.patch (100%)
 rename package/python-setuptools/{ => 44.0.0}/python-setuptools.hash (100%)
 create mode 100644 package/python-setuptools/58.2.0/0001-add-executable.patch
 create mode 100644 package/python-setuptools/58.2.0/python-setuptools.hash

diff --git a/package/python-setuptools/0001-add-executable.patch b/package/python-setuptools/44.0.0/0001-add-executable.patch
similarity index 100%
rename from package/python-setuptools/0001-add-executable.patch
rename to package/python-setuptools/44.0.0/0001-add-executable.patch
diff --git a/package/python-setuptools/python-setuptools.hash b/package/python-setuptools/44.0.0/python-setuptools.hash
similarity index 100%
rename from package/python-setuptools/python-setuptools.hash
rename to package/python-setuptools/44.0.0/python-setuptools.hash
diff --git a/package/python-setuptools/58.2.0/0001-add-executable.patch b/package/python-setuptools/58.2.0/0001-add-executable.patch
new file mode 100644
index 0000000000..23180eb3ec
--- /dev/null
+++ b/package/python-setuptools/58.2.0/0001-add-executable.patch
@@ -0,0 +1,72 @@
+From 9b3d307f8f6a1af88f3f810f5a6cf0835830e1e8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Mon, 7 Dec 2015 01:14:33 +0100
+Subject: [PATCH 1/1] 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 <gustavo@zacarias.com.ar>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
+---
+ 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 72b9a3e..6781d2b 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 9cd8eb0..7786150 100644
+--- a/setuptools/command/install_scripts.py
++++ b/setuptools/command/install_scripts.py
+@@ -13,6 +13,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
+@@ -33,6 +40,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
+         try:
+         bw_cmd = self.get_finalized_command("bdist_wininst")
+         is_wininst = getattr(bw_cmd, '_is_running', False)
+-- 
+2.30.2
+
diff --git a/package/python-setuptools/58.2.0/python-setuptools.hash b/package/python-setuptools/58.2.0/python-setuptools.hash
new file mode 100644
index 0000000000..fc334d81bc
--- /dev/null
+++ b/package/python-setuptools/58.2.0/python-setuptools.hash
@@ -0,0 +1,4 @@
+# From https://pypi.org/pypi/setuptools/json
+md5  32b6cdce670ce462086d246bea181e9d  setuptools-44.0.0.zip
+sha256  2c55bdb85d5bb460bd2e3b12052b677879cffcf46c0c688f2e5bf51d36001145  setuptools-58.2.0.tar.gz
+sha256  db3f0246b1f9278f15845b99fec478b8b506eb76487993722f8c6e254285faf8  LICENSE
diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk
index 08a180ce0c..60811d5748 100644
--- a/package/python-setuptools/python-setuptools.mk
+++ b/package/python-setuptools/python-setuptools.mk
@@ -4,16 +4,22 @@
 #
 ################################################################################
 
-# Please keep in sync with
-# package/python3-setuptools/python3-setuptools.mk
+ifeq ($(BR2_PACKAGE_PYTHON),y)
 PYTHON_SETUPTOOLS_VERSION = 44.0.0
 PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).zip
 PYTHON_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/b0/f3/44da7482ac6da3f36f68e253cb04de37365b3dba9036a3c70773b778b485
+else # Python3
+PYTHON_SETUPTOOLS_VERSION = 58.2.0
+PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON3_SETUPTOOLS_VERSION).tar.gz
+PYTHON_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/1e/5c/3d7b3d91a86d71faf5038c5d259ed36b5d05b7804648e2c43251d574a6e6
+endif
 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
+
+ifeq ($(BR2_PACKAGE_PYTHON),y)
 HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON = python2
 
 define PYTHON_SETUPTOOLS_EXTRACT_CMDS
@@ -27,6 +33,9 @@ define HOST_PYTHON_SETUPTOOLS_EXTRACT_CMDS
 	mv $(@D)/setuptools-$(PYTHON_SETUPTOOLS_VERSION)/* $(@D)
 	$(RM) -r $(@D)/setuptools-$(PYTHON_SETUPTOOLS_VERSION)
 endef
+else
+HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON = python3
+endif
 
 $(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
index 5bab3d96a1..fa415a809f 120000
--- a/package/python3-setuptools/0001-add-executable.patch
+++ b/package/python3-setuptools/0001-add-executable.patch
@@ -1 +1 @@
-../python-setuptools/0001-add-executable.patch
\ No newline at end of file
+../python-setuptools/58.2.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
index a3af7f0fb1..db56660b57 120000
--- a/package/python3-setuptools/python3-setuptools.hash
+++ b/package/python3-setuptools/python3-setuptools.hash
@@ -1 +1 @@
-../python-setuptools/python-setuptools.hash
\ No newline at end of file
+../python-setuptools/58.2.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
index 34d5993120..b6c8ec7b0d 100644
--- a/package/python3-setuptools/python3-setuptools.mk
+++ b/package/python3-setuptools/python3-setuptools.mk
@@ -6,21 +6,15 @@
 
 # Please keep in sync with
 # package/python-setuptools/python-setuptools.mk
-PYTHON3_SETUPTOOLS_VERSION = 44.0.0
-PYTHON3_SETUPTOOLS_SOURCE = setuptools-$(PYTHON3_SETUPTOOLS_VERSION).zip
-PYTHON3_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/b0/f3/44da7482ac6da3f36f68e253cb04de37365b3dba9036a3c70773b778b485
+PYTHON3_SETUPTOOLS_VERSION = 58.2.0
+PYTHON3_SETUPTOOLS_SOURCE = setuptools-$(PYTHON3_SETUPTOOLS_VERSION).tar.gz
+PYTHON3_SETUPTOOLS_SITE = https://files.pythonhosted.org/packages/1e/5c/3d7b3d91a86d71faf5038c5d259ed36b5d05b7804648e2c43251d574a6e6
 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
-
-define HOST_PYTHON3_SETUPTOOLS_EXTRACT_CMDS
-	$(UNZIP) -d $(@D) $(HOST_PYTHON3_SETUPTOOLS_DL_DIR)/$(PYTHON3_SETUPTOOLS_SOURCE)
-	mv $(@D)/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)/* $(@D)
-	$(RM) -r $(@D)/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)
-endef
+HOST_PYTHON3_SETUPTOOLS_DL_SUBDIR = python-setuptools
 
 $(eval $(host-python-package))
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2021-10-09 20:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 20:55 [Buildroot] [PATCH 00/20] package/python3: bump to version 3.10 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 01/20] package/dbus-python: bump to version 1.2.18 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 02/20] package/kmod: bump to version 29 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 03/20] package/python-crossbar: bump to version 21.3.1 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 04/20] package/python-git: bump to version 3.1.24 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 05/20] package/python-gobject: bump to version 3.42.0 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 06/20] package/python-ipython: bump to version 7.28.0 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 07/20] package/python-libusb1: bump to version 2.0.1 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 08/20] package/python-lmdb: bump to version 1.2.1 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 09/20] package/python-dataclasses: new package Adam Duskett
2021-10-10  3:31   ` Asaf Kahlon
2021-10-09 20:55 ` [Buildroot] [PATCH 10/20] package/python-pydantic: bump to version 1.8.2 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 11/20] package/python-txtorcon: bump to version 21.1.0 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 12/20] package/python-watchdog: bump to version 2.1.6 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 13/20] package/util-linux: bump to version 2.37.2 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 14/20] package/python-certifi: add host variant Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 15/20] package/python-matplotlib: bump to version 3.4.3 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 16/20] package/python-numpy: bump to version 1.21.2 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 17/20] package/python-django-enumfields: bump to version 2.1.1 Adam Duskett
2021-10-09 20:55 ` [Buildroot] [PATCH 18/20] package/python-pyalsa: add 0001-fix-pytuple-set-item-usage-no-return-value.patch Adam Duskett
2021-10-09 20:55 ` Adam Duskett [this message]
2021-10-09 20:55 ` [Buildroot] [PATCH 20/20] package/python3: bump to version 3.10 Adam Duskett
2021-10-10 13:55 ` [Buildroot] [PATCH 00/20] " Thomas Petazzoni
2021-10-10 17:38   ` James Hilliard
2021-10-10 19:30   ` Yann E. MORIN
2021-10-11  4:45     ` ratbert90
2021-10-14 21:38 ` Arnout Vandecappelle
2021-10-14 22:44   ` Adam Duskett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211009205523.3137859-20-aduskett@gmail.com \
    --to=aduskett@gmail.com \
    --cc=asafka7@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=eeppeliteloop@gmail.com \
    --cc=ju.o@free.fr \
    --cc=jugurtha.belkalem@smile.fr \
    --cc=matthew.weber@collins.com \
    --cc=mc5686@mclink.it \
    --cc=oli.vogt.pub01@gmail.com \
    --cc=s.martin49@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.