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 | |
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>
-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 000000000..4b3f9631e --- /dev/null +++ b/meta-python/classes/poetry_core.bbclass | |||
@@ -0,0 +1,15 @@ | |||
1 | inherit pip_install_wheel python3native python3-dir setuptools3-base | ||
2 | |||
3 | DEPENDS += "python3 python3-poetry-core-native python3-pip-native" | ||
4 | |||
5 | do_configure () { | ||
6 | mkdir -p ${S}/dist | ||
7 | cat > ${S}/build-it.py << EOF | ||
8 | from poetry.core.masonry import api | ||
9 | api.build_wheel('${S}/dist') | ||
10 | EOF | ||
11 | } | ||
12 | |||
13 | do_compile () { | ||
14 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/build-it.py | ||
15 | } | ||