poetry_core: add helper class

poetry.core.masonry.api is one of the common PEP-517 build backends.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Tim Orling 2022-03-01 12:33:47 -08:00 committed by Khem Raj
parent 238814e5a1
commit d740ecb8c4

View File

@ -0,0 +1,15 @@
inherit pip_install_wheel python3native python3-dir setuptools3-base
DEPENDS += "python3 python3-poetry-core-native python3-pip-native"
do_configure () {
mkdir -p ${S}/dist
cat > ${S}/build-it.py << EOF
from poetry.core.masonry import api
api.build_wheel('${S}/dist')
EOF
}
do_compile () {
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/build-it.py
}