]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/python_poetry_core: use python_pep517_do_compile
authorRoss Burton <ross@burtonini.com>
Wed, 16 Mar 2022 18:32:39 +0000 (18:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 17 Mar 2022 16:43:04 +0000 (16:43 +0000)
Instead of implementing our own do_compile, set PEP517_BUILD_API and
use the generic do_compile.

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

index 47b2fe46d5f9082f5e2dfed9926684ac9fb93184..3fecb6c6bb83af258d9dbcaac6c1f07e35099097 100644 (file)
@@ -2,14 +2,10 @@ inherit python_pep517 python3native setuptools3-base
 
 DEPENDS += "python3-poetry-core-native"
 
+PEP517_BUILD_API = "poetry.core.masonry.api"
+
 python_poetry_core_do_configure () {
     :
 }
 
-# TODO: ideally this uses pypa/build
-python_poetry_core_do_compile () {
-    nativepython3 -c "from poetry.core.masonry import api; api.build_wheel('${PEP517_WHEEL_PATH}')"
-}
-do_compile[cleandirs] += "${PEP517_WHEEL_PATH}"
-
-EXPORT_FUNCTIONS do_configure do_compile
+EXPORT_FUNCTIONS do_configure