All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Orling <ticotimo@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 07/32] python3-pip: inherit setuptools_build_meta
Date: Mon, 21 Feb 2022 13:23:22 -0800	[thread overview]
Message-ID: <d83f4ea0a74e1ee46023eed04b71caadf50d1db5.1645478020.git.tim.orling@konsulko.com> (raw)
In-Reply-To: <cover.1645478020.git.tim.orling@konsulko.com>

Upstream provides a pyproject.toml which declares setuptools.build_meta
as the backend for PEP-517 packaging.

We bootstrap the -native installation by simply unzipping the wheel to
PYTHON_SITEPACKAGES_DIR, so that all other recipes can use pip to
install wheels (as intended by upstream).

[YOCTO #14638]

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 .../python/python3-pip_22.0.3.bb              | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python3-pip_22.0.3.bb b/meta/recipes-devtools/python/python3-pip_22.0.3.bb
index 889a6bf8adc..482a210ee99 100644
--- a/meta/recipes-devtools/python/python3-pip_22.0.3.bb
+++ b/meta/recipes-devtools/python/python3-pip_22.0.3.bb
@@ -4,17 +4,32 @@ SECTION = "devel/python"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030"
 
+inherit pypi setuptools_build_meta
+
 DEPENDS += "python3 python3-setuptools-native"
 
-inherit pypi setuptools3
+# To avoid a dependency loop; we bootstrap -native
+DEPENDS:remove:class-native = "python3-pip-native"
+DEPENDS:append:class-native = " unzip-native"
 
 SRC_URI += "file://0001-change-shebang-to-python3.patch"
 
 SRC_URI[sha256sum] = "f29d589df8c8ab99c060e68ad294c4a9ed896624f6368c5349d70aa581b333d0"
 
+PYPA_WHEEL ?= "${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl"
+
+do_install:class-native() {
+    # Bootstrap to prevent dependency loop in python3-pip-native
+    install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+    unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \
+    bbfatal_log "Failed to unzip wheel: ${PYPA_WHEEL}. Check the logs."
+}
+
 do_install:append() {
     # Install as pip3 and leave pip2 as default
-    rm ${D}/${bindir}/pip
+    if [ -f ${D}/${bindir}/pip ]; then
+        rm ${D}/${bindir}/pip
+    fi
 }
 
 RDEPENDS:${PN} = "\
-- 
2.30.2



  parent reply	other threads:[~2022-02-21 21:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 21:23 [PATCH v2 00/32] Python PEP-517: build wheels and install with pip Tim Orling
2022-02-21 21:23 ` [PATCH v2 01/32] python3-wheel: move 0.37.0 from meta-python Tim Orling
2022-02-23 16:01   ` [OE-core] " Khem Raj
2022-02-23 17:01     ` Tim Orling
2022-02-21 21:23 ` [PATCH v2 02/32] python3-flit-core: add recipe for 3.6.0 Tim Orling
2022-02-21 21:23 ` [PATCH v2 03/32] flit_core.bbclass: add helper for newer python packaging Tim Orling
2022-02-21 21:23 ` [PATCH v2 04/32] python3-wheel: inherit flit_core Tim Orling
2022-02-21 21:23 ` [PATCH v2 05/32] pip_install_wheel.bbclass: add helper class Tim Orling
2022-02-21 21:23 ` [PATCH v2 06/32] setuptools_build_meta.bbclass: " Tim Orling
2022-02-21 21:23 ` Tim Orling [this message]
2022-02-21 21:23 ` [PATCH v2 08/32] python3-attrs: inherit setuptools_build_meta Tim Orling
2022-02-21 21:23 ` [PATCH v2 09/32] python3-git: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 10/32] python3-pytest: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 11/32] python3-setuptools-scm: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 12/32] python3-zipp: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 13/32] python3-iniconfig: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 14/32] python3-py: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 15/32] python3-pluggy: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 16/32] python3-setuptools: inherit setuptools_base_meta Tim Orling
2022-02-21 21:23 ` [PATCH v2 17/32] setuptools3.bbclass: refactor for wheels Tim Orling
2022-02-21 21:23 ` [PATCH v2 18/32] python3-more-itertools: set PIP_INSTALL_PACKAGE Tim Orling
2022-02-21 21:23 ` [PATCH v2 19/32] meson: inherit setuptools_build_meta Tim Orling
2022-02-22  6:55   ` [OE-core] " Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
2022-02-21 21:23 ` [PATCH v2 20/32] python3-libarchive-d: set PIP_INSTALL_PACKAGE Tim Orling
2022-02-21 21:23 ` [PATCH v2 21/32] python3-smartypants: patch hash bang to python3 Tim Orling
2022-02-21 21:23 ` [PATCH v2 22/32] python3-scons: merge -native recipe Tim Orling
2022-02-21 21:23 ` [PATCH v2 23/32] python3-subunit: merge inc; set PIP_INSTALL_PACKAGE Tim Orling
2022-02-21 21:23 ` [PATCH v2 24/32] python3-magic: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 25/32] bmap-tools: set PIP_INSTALL_PACKAGE, BASEVER Tim Orling
2022-02-21 21:23 ` [PATCH v2 26/32] asciidoc: set PIP_INSTALL_PACKAGE Tim Orling
2022-02-21 21:23 ` [PATCH v2 27/32] gi-docgen: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 28/32] numpy: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 29/32] python3-dbusmock: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 30/32] python3-mako: inherit setuptools_build_meta Tim Orling
2022-02-21 21:23 ` [PATCH v2 31/32] python3-packaging: " Tim Orling
2022-02-21 21:23 ` [PATCH v2 32/32] python3-nose: drop recipe Tim Orling
2022-02-22 22:24   ` [OE-core] " Khem Raj
2022-02-22 22:33     ` Tim Orling
2022-02-22 17:22 ` [OE-core] [PATCH v2 00/32] Python PEP-517: build wheels and install with pip Khem Raj
2022-02-22 18:21   ` Tim Orling
2022-02-22 18:23     ` Khem Raj
2022-02-22 18:39       ` Tim Orling
2022-02-22 18:43         ` Tim Orling
2022-02-22 19:18         ` Khem Raj
2022-02-22 19:22           ` Tim Orling
2022-02-24  4:06             ` Khem Raj
2022-02-24  4:50               ` Tim Orling
     [not found]               ` <16D69FA5F268A6BB.31711@lists.openembedded.org>
2022-02-24  5:42                 ` Tim Orling

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=d83f4ea0a74e1ee46023eed04b71caadf50d1db5.1645478020.git.tim.orling@konsulko.com \
    --to=ticotimo@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.