]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3-xmltodict: Copy recipe from meta-python
authorSamantha Jalabert <samantha.jalabert@syslinbit.com>
Fri, 22 Sep 2023 14:46:25 +0000 (14:46 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 27 Sep 2023 10:47:36 +0000 (11:47 +0100)
commit: 61d14138c22a70188d585d85e35fdf86bc65e66f

Signed-off-by: Marta Rybczynska <mrybczynska@syslinbit.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3-xmltodict/run-ptest [new file with mode: 0644]
meta/recipes-devtools/python/python3-xmltodict_0.13.0.bb [new file with mode: 0644]

diff --git a/meta/recipes-devtools/python/python3-xmltodict/run-ptest b/meta/recipes-devtools/python/python3-xmltodict/run-ptest
new file mode 100644 (file)
index 0000000..3385d68
--- /dev/null
@@ -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/SKIPED/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/recipes-devtools/python/python3-xmltodict_0.13.0.bb b/meta/recipes-devtools/python/python3-xmltodict_0.13.0.bb
new file mode 100644 (file)
index 0000000..132aae8
--- /dev/null
@@ -0,0 +1,31 @@
+SUMMARY = "Makes working with XML feel like you are working with JSON"
+HOMEPAGE = "https://github.com/martinblech/xmltodict"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=01441d50dc74476db58a41ac10cb9fa2"
+
+SRC_URI[sha256sum] = "341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"
+
+PYPI_PACKAGE = "xmltodict"
+
+BBCLASSEXTEND = "native nativesdk"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+       file://run-ptest \
+"
+
+RDEPENDS:${PN} += " \
+       ${PYTHON_PN}-core \
+       ${PYTHON_PN}-xml \
+       ${PYTHON_PN}-io \
+"
+
+RDEPENDS:${PN}-ptest += " \
+       ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+       install -d ${D}${PTEST_PATH}/tests
+       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}