From 5331d29a898da61ce2df78bc1ce36dc23dcc0017 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 10 Mar 2022 11:40:33 +0000 Subject: pip_install_wheel: add a generic do_install for bootstrapping Several recipes are duplicating the same bootstrap logic for installing a wheel without using any tools. Add an implementation to pip_install_wheel to centralise the code, and remove the duplicated code from the following recipes: - python3-flit-core - python3-pip - python3-setuptools - python3-wheel (From OE-Core rev: d5d702a2cd06f863340f8e4cdce0904c9d86384d) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/pip_install_wheel.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta/classes') diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index 3861dae75a..29cd544aa3 100644 --- a/meta/classes/pip_install_wheel.bbclass +++ b/meta/classes/pip_install_wheel.bbclass @@ -40,4 +40,10 @@ pip_install_wheel_do_install () { done } +# A manual do_install that just uses unzip for bootstrapping purposes. Callers should DEPEND on unzip-native. +pip_install_wheel_do_bootstrap_install () { + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PIP_INSTALL_DIST_PATH}/*.whl +} + EXPORT_FUNCTIONS do_install -- cgit v1.2.3-54-g00ecf