diff options
author | Tim Orling <ticotimo@gmail.com> | 2022-03-01 12:33:47 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-03-03 08:50:19 -0800 |
commit | d740ecb8c484d2a3785f1fb2af54d8c49fe21297 (patch) | |
tree | 8482fca6b59feb56ab29ce6dcbfe145705083972 /meta-python/classes | |
parent | 238814e5a196a7e1568f50223cbddc35518e4615 (diff) | |
download | meta-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>
Diffstat (limited to 'meta-python/classes')
-rw-r--r-- | meta-python/classes/poetry_core.bbclass | 15 |
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 0000000000..4b3f9631e2 --- /dev/null +++ b/meta-python/classes/poetry_core.bbclass @@ -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 +} |