Add ptest and upgrade to release 0.13.1:

- pyproject.toml: add pytest as dev dependency
- Import Self from type_checking if needed to be compat with 3.9
- CI: run pytest via uv
- CI: test against multiple python versions

Signed-off-by: Leon Anavi <[email protected]>
---
 .../python/python3-libevdev/run-ptest          |  3 +++
 ...vdev_0.12.bb => python3-libevdev_0.13.1.bb} | 18 ++++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 
meta-python/recipes-devtools/python/python3-libevdev/run-ptest
 rename meta-python/recipes-devtools/python/{python3-libevdev_0.12.bb => 
python3-libevdev_0.13.1.bb} (52%)

diff --git a/meta-python/recipes-devtools/python/python3-libevdev/run-ptest 
b/meta-python/recipes-devtools/python/python3-libevdev/run-ptest
new file mode 100644
index 0000000000..8d2017d39c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-libevdev/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-libevdev_0.12.bb 
b/meta-python/recipes-devtools/python/python3-libevdev_0.13.1.bb
similarity index 52%
rename from meta-python/recipes-devtools/python/python3-libevdev_0.12.bb
rename to meta-python/recipes-devtools/python/python3-libevdev_0.13.1.bb
index cabcfd8df6..1c8a99eb33 100644
--- a/meta-python/recipes-devtools/python/python3-libevdev_0.12.bb
+++ b/meta-python/recipes-devtools/python/python3-libevdev_0.13.1.bb
@@ -5,13 +5,27 @@ SECTION = "devel/python"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d94c10c546b419eddc6296157ec40747"
 
-SRC_URI[sha256sum] = 
"02e952632ec6c249cbb9c66f6fa00012ea448b06606c77cd139133bc2fe46b08"
+SRC_URI[sha256sum] = 
"dc3369cd1401767b9ecb1117cd6b73faba9038e3bd9e1695a710a9e9d9415e8d"
 
-inherit pypi setuptools3
+inherit pypi python_hatchling ptest
 
 PYPI_PACKAGE = "libevdev"
 
+SRC_URI += " \
+    file://run-ptest \
+"
+
 RDEPENDS:${PN} += " \
     libevdev \
     python3-ctypes \
 "
+
+RDEPENDS:${PN}-ptest += " \
+    python3-pytest \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/test
+    cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
+}
+
-- 
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#123434): 
https://lists.openembedded.org/g/openembedded-devel/message/123434
Mute This Topic: https://lists.openembedded.org/mt/117241112/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to