@@ -61,6 +61,7 @@ PTESTS_FAST_META_PYTHON = "\
python3-smpplib \
python3-soupsieve \
python3-sqlparse \
+ python3-tomli-w \
python3-tomlkit \
python3-trustme \
python3-typeguard \
new file mode 100644
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
new file mode 100644
@@ -0,0 +1,34 @@
+DESCRIPTION = "Tomli-W is a Python library for writing TOML. It is a write-only counterpart to Tomli, which is a read-only TOML parser."
+HOMEPAGE = "https://github.com/hukkin/tomli-w"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aaaaf0879d17df0110d1aa8c8c9f46f5"
+
+SRCREV = "19099125f32e7c491603e393263754262b356956"
+PYPI_SRC_URI = "git://github.com/hukkin/tomli-w.git;protocol=https;branch=master"
+
+inherit pypi python_flit_core ptest
+
+S = "${WORKDIR}/git"
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+ python3-pytest \
+ python3-tomli \
+ python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ install -d ${D}${PTEST_PATH}/benchmark
+ cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+ cp -rf ${S}/benchmark/* ${D}${PTEST_PATH}/benchmark/
+}
+
+RDEPENDS:${PN} += " \
+ python3-datetime \
+ python3-numbers \
+ python3-stringold \
+"
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> --- .../ptest-packagelists-meta-python.inc | 1 + .../python/python3-tomli-w/run-ptest | 3 ++ .../python/python3-tomli-w_1.0.0.bb | 34 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-tomli-w/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-tomli-w_1.0.0.bb