diff mbox series

[11/11] python3-tomlkit: add recipe

Message ID 20230517201456.1608917-12-tgamblin@baylibre.com
State New
Headers show
Series patchtest: layer updates | expand

Commit Message

Trevor Gamblin May 17, 2023, 8:14 p.m. UTC
python3-pylint requires python3-tomlkit, so copy the recipe from
meta-python to avoid requiring that layer for patchtest.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 .../python/python3-tomlkit/run-ptest          |  3 +++
 .../python/python3-tomlkit_0.11.8.bb          | 23 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 meta-patchtest/recipes-devtools/python/python3-tomlkit/run-ptest
 create mode 100644 meta-patchtest/recipes-devtools/python/python3-tomlkit_0.11.8.bb
diff mbox series

Patch

diff --git a/meta-patchtest/recipes-devtools/python/python3-tomlkit/run-ptest b/meta-patchtest/recipes-devtools/python/python3-tomlkit/run-ptest
new file mode 100644
index 0000000..b63c4de
--- /dev/null
+++ b/meta-patchtest/recipes-devtools/python/python3-tomlkit/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
diff --git a/meta-patchtest/recipes-devtools/python/python3-tomlkit_0.11.8.bb b/meta-patchtest/recipes-devtools/python/python3-tomlkit_0.11.8.bb
new file mode 100644
index 0000000..71a43c4
--- /dev/null
+++ b/meta-patchtest/recipes-devtools/python/python3-tomlkit_0.11.8.bb
@@ -0,0 +1,23 @@ 
+SUMMARY = "Style preserving TOML library"
+HOMEPAGE = "https://pypi.org/project/tomlkit/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=31aac0dbc1babd278d5386dadb7f8e82"
+
+SRC_URI[sha256sum] = "9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"
+
+inherit pypi python_poetry_core ptest
+
+SRC_URI += " \
+        file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+        ${PYTHON_PN}-poetry-core \
+        ${PYTHON_PN}-pytest \
+        ${PYTHON_PN}-pyyaml \
+"
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}