]> code.ossystems Code Review - openembedded-core.git/commitdiff
setuptools_build_meta: respect PIP_INSTALL_DIST_PATH
authorRoss Burton <ross@burtonini.com>
Tue, 8 Mar 2022 14:30:32 +0000 (14:30 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Mar 2022 11:46:23 +0000 (11:46 +0000)
pip_install_wheel expects the wheels to be in PIP_INSTALL_DIST_PATH but
this class was writing to the same directory through chance not design.

Respect PIP_INSTALL_DIST_PATH as the output directory, and use
[cleandirs] to ensure that it exists and is empty.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/setuptools_build_meta.bbclass

index 0651cca0a071971a7686049d27001884a2708f93..18ae2e60044f292755394710edf831c7c83e04c0 100644 (file)
@@ -8,8 +8,8 @@ setuptools_build_meta_do_configure () {
 
 # TODO: ideally this uses pypa/build
 setuptools_build_meta_do_compile () {
-    mkdir -p ${S}/dist
-    nativepython3 -c "from setuptools import build_meta; build_meta.build_wheel('./dist')"
+    nativepython3 -c "from setuptools import build_meta; build_meta.build_wheel('${PIP_INSTALL_DIST_PATH}')"
 }
+do_compile[cleandirs] += "${PIP_INSTALL_DIST_PATH}"
 
 EXPORT_FUNCTIONS do_configure do_compile