Skip to contentSkip to conversation

python3-pip: clean up PYPA_WHEEL usage

PATCH New Ross Burton 1 participant 7 messages Mar 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 python3-pip: clean up PYPA_WHEEL usage

There's no need to set PYPA_WHEEL as the default is sufficient.

Remove the use of PYPA_WHEEL in the native do_install() as this variable will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then something has gone very wrong and the user is not expected to fix it.

---
 meta/recipes-devtools/python/python3-pip_22.0.3.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-devtools/python/python3-pip_22.0.3.bb +1 -4
index 8d6dfcede7..d7000b891a 100644
@@ -18,13 +18,10 @@ SRC_URI += "file://reproducible.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."
+    unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PIP_INSTALL_DIST_PATH}/*.whl
 
     # pip install would normally generate [console_scripts] in ${bindir}
     install -d ${D}/${bindir}
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/7 python3-setuptools3: clean up PYPA_WHEEL usage

There's no need to set PYPA_WHEEL as the default is sufficient.

Remove the use of PYPA_WHEEL in the native do_install() as this variable will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then something has gone very wrong and the user is not expected to fix it.

---
 meta/recipes-devtools/python/python3-setuptools_59.5.0.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-devtools/python/python3-setuptools_59.5.0.bb +1 -4
index 2155101d30..9d2c2fd744 100644
@@ -21,13 +21,10 @@ DEPENDS += "${PYTHON_PN}"
 DEPENDS:remove:class-native = "python3-pip-native python3-setuptools-native"
 DEPENDS:append:class-native = " unzip-native"
 
-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."
+    unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PIP_INSTALL_DIST_PATH}/*.whl
 }
 
 RDEPENDS:${PN} = "\
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/7 python3-wheel: clean up PYPA_WHEEL usage

In reply to Ross Burton

Remove the use of PYPA_WHEEL in the native do_install() as this variable will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then something has gone very wrong and the user is not expected to fix it.

Also flit_core inherits setuptools3-base, so no need to inherit it again.

---
 meta/recipes-devtools/python/python3-wheel_0.37.1.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/recipes-devtools/python/python3-wheel_0.37.1.bb +2 -5
index 91bff82509..83a7c986a8 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=10;endline=10;md5=8227180126797a01
 
 SRC_URI[sha256sum] = "e9a504e793efbca1b8e0e9cb979a249cf4a0a7b5b8c9e8b65a5e39d49529c1c4"
 
-inherit flit_core pypi setuptools3-base
+inherit flit_core pypi
 
 SRC_URI += " file://0001-Backport-pyproject.toml-from-flit-backend-branch.patch"
 
@@ -15,9 +15,7 @@ DEPENDS:remove:class-native = "python3-pip-native"
 do_install:class-native () {
     # We need to bootstrap python3-wheel-native
     install -d ${D}${PYTHON_SITEPACKAGES_DIR}
-    PYPA_WHEEL="${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl"
-    unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \
-    bbfatal_log "Failed to install"
+    unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PIP_INSTALL_DIST_PATH}/*.whl
 
     # pip install would normally generate [project.scripts] in ${bindir}
     install -d ${D}/${bindir}
@@ -37,4 +35,3 @@ EOF
 }
 
 BBCLASSEXTEND = "native nativesdk"
-
Signature · 1 line
2.25.1
#3 lore raw

PATCH 4/7 bmap-tools: remove redundant PYPA_WHEEL

In reply to Ross Burton

The default is good, this doesn't need to be set.

---
 meta/recipes-support/bmap-tools/bmap-tools_git.bb | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-support/bmap-tools/bmap-tools_git.bb +0 -1
index c5acdc5cbf..2999fdcea1 100644
@@ -24,6 +24,5 @@ RDEPENDS:${PN} = "python3-core python3-compression python3-mmap python3-setuptoo
 inherit setuptools3
 
 PIP_INSTALL_PACKAGE = "bmap_tools"
-PYPA_WHEEL = "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-${BASEVER}-*.whl"
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
#4 lore raw

PATCH 5/7 python3-markdown: use setuptools_build_meta

In reply to Ross Burton

This project builds with setuptools_build_meta, so use that instead.

---
 meta/recipes-devtools/python/python3-markdown_3.3.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-markdown_3.3.6.bb +1 -1
index 7b64da6d5b..a46a9ae066 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "https://python-markdown.github.io/"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=745aaad0c69c60039e638bff9ffc59ed"
 
-inherit pypi setuptools3
+inherit pypi setuptools_build_meta
 
 PYPI_PACKAGE = "Markdown"
 SRC_URI[sha256sum] = "76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"
Signature · 1 line
2.25.1
#5 lore raw

PATCH 6/7 python3-pyrsistent: use setuptools_build_meta

In reply to Ross Burton

This project builds with setuptools_build_meta, so use that instead.

---
 meta/recipes-devtools/python/python3-pyrsistent_0.18.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-pyrsistent_0.18.1.bb +1 -1
index 4c9b8ec1dd..ecd55672f5 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.mit;md5=b695eb9c6e7a6fb1b1bc2d193c42776e"
 
 SRC_URI[sha256sum] = "d4d61f8b993a7255ba714df3aca52700f8125289f84f704cf80916517c46eb96"
 
-inherit pypi setuptools3
+inherit pypi setuptools_build_meta
 
 RDEPENDS:${PN} += " \
     ${PYTHON_PN}-numbers \
Signature · 1 line
2.25.1
#6 lore raw

PATCH 7/7 python3-pyyaml: use setuptools_build_meta

In reply to Ross Burton

This project builds with setuptools_build_meta, so use that instead.

---
 meta/recipes-devtools/python/python3-pyyaml_6.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-pyyaml_6.0.bb +1 -1
index 2df0e649f0..6fe726110d 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=6d8242660a8371add5fe547adf083079"
 
 PYPI_PACKAGE = "PyYAML"
 
-inherit pypi setuptools3
+inherit pypi setuptools_build_meta
 
 SRC_URI[sha256sum] = "68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"
 
Signature · 1 line
2.25.1