summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authoralperak <alperyasinak1@gmail.com>2024-03-07 22:45:27 +0300
committerKhem Raj <raj.khem@gmail.com>2024-03-08 10:07:27 -0800
commit18e019ee2295ab42849e510d5efeee94bf1d9056 (patch)
tree9a5e9077c7aaf6931bffb5c8ce1f7da722d41e38 /meta-python
parentcbb570cdd963de547e4fa94ca1851d8d889a7cf3 (diff)
downloadmeta-openembedded-18e019ee2295ab42849e510d5efeee94bf1d9056.tar.gz
python3-tomli-w: added recipe which is also include ptest
Tomli-W is the write-only counterpart of Tomli, providing dump and dumps functions. * When we fetch the package via PyPI there are missing files such as tests directory. So, we set PYPI_SRC_URI and fetch it from the github url. * Ptest and library example tested on qemux86-64 and qemuarm64 * Add ptest into PTESTS_FAST_META_PYTHON Ptest result: ============== qemux86-64: Testsuite summary TOTAL: 265 PASS: 263 SKIP: 0 XFAIL: 2 FAIL: 0 XPASS: 0 ERROR: 0 DURATION: 15 END: /usr/lib/python3-tomli-w/ptest 2024-03-07T17:33 STOP: ptest-runner TOTAL: 1 FAIL: 0 qemuarm64: Testsuite summary TOTAL: 265 PASS: 263 SKIP: 0 XFAIL: 2 FAIL: 0 XPASS: 0 ERROR: 0 DURATION: 15 END: /usr/lib/python3-tomli-w/ptest 2024-03-07T17:25 STOP: ptest-runner TOTAL: 1 FAIL: 0 XFAIL: tests/test_valid.py:test_valid[qa-array-inline-nested-1000] XFAIL reason: This much recursion is not supported Signed-off-by: alperak <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/conf/include/ptest-packagelists-meta-python.inc1
-rw-r--r--meta-python/recipes-devtools/python/python3-tomli-w/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-tomli-w_1.0.0.bb34
3 files changed, 38 insertions, 0 deletions
diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 0cb3046cf..20ca2763c 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -61,6 +61,7 @@ PTESTS_FAST_META_PYTHON = "\
61 python3-smpplib \ 61 python3-smpplib \
62 python3-soupsieve \ 62 python3-soupsieve \
63 python3-sqlparse \ 63 python3-sqlparse \
64 python3-tomli-w \
64 python3-tomlkit \ 65 python3-tomlkit \
65 python3-trustme \ 66 python3-trustme \
66 python3-typeguard \ 67 python3-typeguard \
diff --git a/meta-python/recipes-devtools/python/python3-tomli-w/run-ptest b/meta-python/recipes-devtools/python/python3-tomli-w/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-tomli-w/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-tomli-w_1.0.0.bb b/meta-python/recipes-devtools/python/python3-tomli-w_1.0.0.bb
new file mode 100644
index 000000000..8a8a48467
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-tomli-w_1.0.0.bb
@@ -0,0 +1,34 @@
1DESCRIPTION = "Tomli-W is a Python library for writing TOML. It is a write-only counterpart to Tomli, which is a read-only TOML parser."
2HOMEPAGE = "https://github.com/hukkin/tomli-w"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=aaaaf0879d17df0110d1aa8c8c9f46f5"
5
6SRCREV = "19099125f32e7c491603e393263754262b356956"
7PYPI_SRC_URI = "git://github.com/hukkin/tomli-w.git;protocol=https;branch=master"
8
9inherit pypi python_flit_core ptest
10
11S = "${WORKDIR}/git"
12
13SRC_URI += " \
14 file://run-ptest \
15"
16
17RDEPENDS:${PN}-ptest += " \
18 python3-pytest \
19 python3-tomli \
20 python3-unittest-automake-output \
21"
22
23do_install_ptest() {
24 install -d ${D}${PTEST_PATH}/tests
25 install -d ${D}${PTEST_PATH}/benchmark
26 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
27 cp -rf ${S}/benchmark/* ${D}${PTEST_PATH}/benchmark/
28}
29
30RDEPENDS:${PN} += " \
31 python3-datetime \
32 python3-numbers \
33 python3-stringold \
34"