]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
python3_pip517: just count wheels in the directory, not subdirectories
authorRoss Burton <ross.burton@arm.com>
Fri, 15 Mar 2024 14:37:49 +0000 (14:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Mar 2024 16:24:21 +0000 (16:24 +0000)
The install task uses a recursive find to check that it can only find
one wheel, but then does a non-recursive glob to install.  This can
lead to false-failures if PEP517_WHEEL_PATH points at a directory with
subdirectories.

Solve this mismatch by making the find non-recusive.

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

index a1659c5f628eedec5a8761d71f026c8bf2589229..c30674c8ec82ba84f1bb078e9358b3ed38f69059 100644 (file)
@@ -42,7 +42,7 @@ python_pep517_do_compile () {
 do_compile[cleandirs] += "${PEP517_WHEEL_PATH}"
 
 python_pep517_do_install () {
-    COUNT=$(find ${PEP517_WHEEL_PATH} -name '*.whl' | wc -l)
+    COUNT=$(find ${PEP517_WHEEL_PATH} -name '*.whl' -maxdepth 1 | wc -l)
     if test $COUNT -eq 0; then
         bbfatal No wheels found in ${PEP517_WHEEL_PATH}
     elif test $COUNT -gt 1; then