summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2022-03-01 12:33:47 -0800
committerKhem Raj <raj.khem@gmail.com>2022-03-03 08:50:19 -0800
commitd740ecb8c484d2a3785f1fb2af54d8c49fe21297 (patch)
tree8482fca6b59feb56ab29ce6dcbfe145705083972
parent238814e5a196a7e1568f50223cbddc35518e4615 (diff)
downloadmeta-openembedded-d740ecb8c484d2a3785f1fb2af54d8c49fe21297.tar.gz
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>
-rw-r--r--meta-python/classes/poetry_core.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-python/classes/poetry_core.bbclass b/meta-python/classes/poetry_core.bbclass
new file mode 100644
index 000000000..4b3f9631e
--- /dev/null
+++ b/meta-python/classes/poetry_core.bbclass
@@ -0,0 +1,15 @@
1inherit pip_install_wheel python3native python3-dir setuptools3-base
2
3DEPENDS += "python3 python3-poetry-core-native python3-pip-native"
4
5do_configure () {
6 mkdir -p ${S}/dist
7 cat > ${S}/build-it.py << EOF
8from poetry.core.masonry import api
9api.build_wheel('${S}/dist')
10EOF
11}
12
13do_compile () {
14 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/build-it.py
15}