diff mbox series

[meta-python] python3-httptools: added recipe which is also include ptest

Message ID 20240308201804.3252753-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-python] python3-httptools: added recipe which is also include ptest | expand

Commit Message

Alper Ak March 8, 2024, 8:18 p.m. UTC
httptools is a Python binding for the nodejs HTTP parser.

* Tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_FAST_META_PYTHON

Ptest result:
=============
qemux86-64:

Testsuite summary
TOTAL: 38
PASS: 38
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 10
END: /usr/lib/python3-httptools/ptest
2024-03-08T20:05
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 38
PASS: 38
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 7
END: /usr/lib/python3-httptools/ptest
2024-03-08T20:08
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-httptools/run-ptest        |  3 +++
 .../python/python3-httptools_0.6.1.bb         | 22 +++++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-httptools/run-ptest
 create mode 100644 meta-python/recipes-devtools/python/python3-httptools_0.6.1.bb
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 5ace8a9a2..447e0b938 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -24,6 +24,7 @@  PTESTS_FAST_META_PYTHON = "\
     python3-gpiod \
     python3-gunicorn \
     python3-html2text \
+    python3-httptools \
     python3-inflection \
     python3-inotify \
     python3-intervals \
diff --git a/meta-python/recipes-devtools/python/python3-httptools/run-ptest b/meta-python/recipes-devtools/python/python3-httptools/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-httptools/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-httptools_0.6.1.bb b/meta-python/recipes-devtools/python/python3-httptools_0.6.1.bb
new file mode 100644
index 000000000..4192697df
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-httptools_0.6.1.bb
@@ -0,0 +1,22 @@ 
+SUMMARY = "A collection of framework independent HTTP protocol utils."
+HOMEPAGE = "https://github.com/MagicStack/httptools"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0a2d82955bf3facdf04cb882655e840e"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI[sha256sum] = "c6e26c30455600b95d94b1b836085138e82f177351454ee841c148f93a9bad5a"
+
+SRC_URI += " \
+        file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+        python3-pytest \
+        python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}