diff options
author | Tim Orling <ticotimo@gmail.com> | 2022-02-22 11:16:33 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-25 15:07:50 +0000 |
commit | 5c46eeb375c2e6b3d439a01711420b883db168fb (patch) | |
tree | 4ca79c697387ead865651788481dc5362a769073 /meta/recipes-devtools | |
parent | 74e5fc20c05b3f6b406dbd0b3792a6afa5f3fdab (diff) | |
download | poky-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.bb | 19 |
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" | |||
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030" |
6 | 6 | ||
7 | inherit pypi setuptools_build_meta | ||
8 | |||
7 | DEPENDS += "python3 python3-setuptools-native" | 9 | DEPENDS += "python3 python3-setuptools-native" |
8 | 10 | ||
9 | inherit pypi setuptools3 | 11 | # To avoid a dependency loop; we bootstrap -native |
12 | DEPENDS:remove:class-native = "python3-pip-native" | ||
13 | DEPENDS:append:class-native = " unzip-native" | ||
10 | 14 | ||
11 | SRC_URI += "file://0001-change-shebang-to-python3.patch" | 15 | SRC_URI += "file://0001-change-shebang-to-python3.patch" |
12 | 16 | ||
13 | SRC_URI[sha256sum] = "f29d589df8c8ab99c060e68ad294c4a9ed896624f6368c5349d70aa581b333d0" | 17 | SRC_URI[sha256sum] = "f29d589df8c8ab99c060e68ad294c4a9ed896624f6368c5349d70aa581b333d0" |
14 | 18 | ||
19 | PYPA_WHEEL ?= "${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl" | ||
20 | |||
21 | do_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 | |||
15 | do_install:append() { | 28 | do_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 | ||
20 | RDEPENDS:${PN} = "\ | 35 | RDEPENDS:${PN} = "\ |