From: <mingli.yu@windriver.com>
To: <openembedded-core@lists.openembedded.org>, <luca.ceresoli@bootlin.com>
Subject: [PATCH 4/7] python3-py-cpuinfo: move from meta-python
Date: Tue, 17 May 2022 16:16:30 +0800 [thread overview]
Message-ID: <20220517081633.2992360-4-mingli.yu@windriver.com> (raw)
In-Reply-To: <20220517081633.2992360-1-mingli.yu@windriver.com>
From: Mingli Yu <mingli.yu@windriver.com>
Py-cpuinfo gets CPU info with pure Python. Py-cpuinfo should
work without any extra programs or libraries, beyond what your
OS provides. It does not require any compilation(C/C++, assembly,
et cetera) to use. It works with Python 2 and 3.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
.../python/python3-py-cpuinfo/run-ptest | 3 +++
.../python/python3-py-cpuinfo_8.0.0.bb | 27 +++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 meta/recipes-devtools/python/python3-py-cpuinfo/run-ptest
create mode 100644 meta/recipes-devtools/python/python3-py-cpuinfo_8.0.0.bb
diff --git a/meta/recipes-devtools/python/python3-py-cpuinfo/run-ptest b/meta/recipes-devtools/python/python3-py-cpuinfo/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-py-cpuinfo/run-ptest
@@ -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/SKIPPED/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-py-cpuinfo_8.0.0.bb b/meta/recipes-devtools/python/python3-py-cpuinfo_8.0.0.bb
new file mode 100644
index 0000000000..6de2f17459
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-py-cpuinfo_8.0.0.bb
@@ -0,0 +1,27 @@
+# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Get CPU info with pure Python 2 & 3"
+HOMEPAGE = "https://github.com/workhorsy/py-cpuinfo"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b0b97c022f12b14d9e02de0b283ee9e9"
+
+SRC_URI[sha256sum] = "5f269be0e08e33fd959de96b34cd4aeeeacac014dd8305f70eb28d06de2345c5"
+
+inherit ptest pypi setuptools3
+
+SRC_URI += "file://run-ptest \
+ "
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS:${PN}-ptest += "\
+ python3-pytest \
+"
+
+RDEPENDS:${PN} += "python3-core python3-ctypes python3-datetime python3-json python3-io python3-mmap python3-multiprocessing python3-netclient python3-pickle python3-pprint python3-shell"
+
+BBCLASSEXTEND = "native nativesdk"
--
2.25.1
next prev parent reply other threads:[~2022-05-17 8:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 2:13 [PATCH] python3-cryptography: add python3-pytest-benchmark rdepends mingli.yu
2022-05-16 8:45 ` [OE-core] " Luca Ceresoli
2022-05-17 8:16 ` [PATCH v2 1/7] " mingli.yu
2022-05-17 8:16 ` [PATCH 2/7] python3-pytest-benchmark: move from meta-python mingli.yu
2022-05-17 8:16 ` [PATCH 3/7] python3-aspectlib: " mingli.yu
2022-05-17 8:16 ` mingli.yu [this message]
2022-05-17 8:16 ` [PATCH 5/7] python3-fields: " mingli.yu
2022-05-17 8:16 ` [PATCH 6/7] python3-process-tests: " mingli.yu
2022-05-17 8:16 ` [PATCH 7/7] python3-tornad: " mingli.yu
2022-05-17 15:33 ` [OE-core] " Khem Raj
2022-05-17 8:40 ` [OE-core] [PATCH v2 1/7] python3-cryptography: add python3-pytest-benchmark rdepends richard.purdie
2022-05-17 10:22 ` [PATCH v3] python3-cryptography: remove --benchmark-disable option mingli.yu
2022-06-08 9:31 ` mingli.yu
2022-06-09 7:06 ` [OE-core] " Luca Ceresoli
2022-06-13 7:30 ` [PATCH v4] python3-cryptography: remove test_x509.py mingli.yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220517081633.2992360-4-mingli.yu@windriver.com \
--to=mingli.yu@windriver.com \
--cc=luca.ceresoli@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox