summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2022-02-22 11:16:33 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-25 15:07:50 +0000
commit5c46eeb375c2e6b3d439a01711420b883db168fb (patch)
tree4ca79c697387ead865651788481dc5362a769073 /meta/recipes-devtools
parent74e5fc20c05b3f6b406dbd0b3792a6afa5f3fdab (diff)
downloadpoky-5c46eeb375c2e6b3d439a01711420b883db168fb.tar.gz
python3-pip: inherit setuptools_build_meta
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). Check for presence of ${D}${bindir}/pip and remove if found (this was originally to make sure Python2 pip was the default). [YOCTO #14638] (From OE-Core rev: 082fb72ed1683a699ef4bc2c92aa987ce9c46509) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python3-pip_22.0.3.bb19
1 files 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 889a6bf8ad..c4671f5017 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"
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030" 5LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030"
6 6
7inherit pypi setuptools_build_meta
8
7DEPENDS += "python3 python3-setuptools-native" 9DEPENDS += "python3 python3-setuptools-native"
8 10
9inherit pypi setuptools3 11# To avoid a dependency loop; we bootstrap -native
12DEPENDS:remove:class-native = "python3-pip-native"
13DEPENDS:append:class-native = " unzip-native"
10 14
11SRC_URI += "file://0001-change-shebang-to-python3.patch" 15SRC_URI += "file://0001-change-shebang-to-python3.patch"
12 16
13SRC_URI[sha256sum] = "f29d589df8c8ab99c060e68ad294c4a9ed896624f6368c5349d70aa581b333d0" 17SRC_URI[sha256sum] = "f29d589df8c8ab99c060e68ad294c4a9ed896624f6368c5349d70aa581b333d0"
14 18
19PYPA_WHEEL ?= "${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl"
20
21do_install:class-native() {
22 # Bootstrap to prevent dependency loop in python3-pip-native
23 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
24 unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \
25 bbfatal_log "Failed to unzip wheel: ${PYPA_WHEEL}. Check the logs."
26}
27
15do_install:append() { 28do_install:append() {
16 # Install as pip3 and leave pip2 as default 29 # Install as pip3 and leave pip2 as default
17 rm ${D}/${bindir}/pip 30 if [ -e ${D}/${bindir}/pip ]; then
31 rm ${D}/${bindir}/pip
32 fi
18} 33}
19 34
20RDEPENDS:${PN} = "\ 35RDEPENDS:${PN} = "\