From: <mingli.yu@windriver.com>
To: <openembedded-core@lists.openembedded.org>, <luca.ceresoli@bootlin.com>
Subject: [PATCH 3/7] python3-aspectlib: move from meta-python
Date: Tue, 17 May 2022 16:16:29 +0800 [thread overview]
Message-ID: <20220517081633.2992360-3-mingli.yu@windriver.com> (raw)
In-Reply-To: <20220517081633.2992360-1-mingli.yu@windriver.com>
From: Mingli Yu <mingli.yu@windriver.com>
aspectlib is an aspect-oriented programming, monkey-patch and
decorators library. It is useful when changing behavior in
existing code is desired. It includes tools for debugging and
testing: simple mock/record and a complete capture/replay
framework.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
...ve-tornado-6-test-constraint.-Ref-15.patch | 45 +++++++++++++++++++
.../python/python3-aspectlib/run-ptest | 3 ++
.../python/python3-aspectlib_1.5.2.bb | 29 ++++++++++++
3 files changed, 77 insertions(+)
create mode 100644 meta/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
create mode 100644 meta/recipes-devtools/python/python3-aspectlib/run-ptest
create mode 100644 meta/recipes-devtools/python/python3-aspectlib_1.5.2.bb
diff --git a/meta/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch b/meta/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
new file mode 100644
index 0000000000..174f088e9e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
@@ -0,0 +1,45 @@
+From d3ae6ac951cc5bbce29b9c987741e0a557c9b777 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
+Date: Sun, 2 May 2021 09:50:43 +0300
+Subject: [PATCH] Remove tornado<6 test constraint. Ref #15.
+
+Upstream-Status: Backport [https://github.com/ionelmc/python-aspectlib/commit/7dccb198dfb426f529b81a28a755f3c02f8b50cb]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/test_integrations_py3.py | 5 ++++-
+ tox.ini | 3 ++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_integrations_py3.py b/tests/test_integrations_py3.py
+index e025eac..596589d 100644
+--- a/tests/test_integrations_py3.py
++++ b/tests/test_integrations_py3.py
+@@ -36,7 +36,10 @@ def test_decorate_tornado_coroutine():
+ @gen.coroutine
+ @debug.log(print_to=buf, module=False, stacktrace=2, result_repr=repr)
+ def coro():
+- yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
++ if hasattr(gen, 'Task'):
++ yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
++ else:
++ yield gen.sleep(0.01)
+ return "result"
+
+ loop = ioloop.IOLoop.current()
+diff --git a/tox.ini b/tox.ini
+index 8c607de..08c31b3 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -55,7 +55,8 @@ deps =
+ pytest-clarity
+ pytest-cov
+ pytest-travis-fold
+- tornado<6.0
++ six
++ tornado
+ commands =
+ {posargs:pytest --cov --cov-report=term-missing -vv --ignore=src}
+
+--
+2.32.0
+
diff --git a/meta/recipes-devtools/python/python3-aspectlib/run-ptest b/meta/recipes-devtools/python/python3-aspectlib/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-aspectlib/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-aspectlib_1.5.2.bb b/meta/recipes-devtools/python/python3-aspectlib_1.5.2.bb
new file mode 100644
index 0000000000..0cbeca21c7
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-aspectlib_1.5.2.bb
@@ -0,0 +1,29 @@
+# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "``aspectlib`` is an aspect-oriented programming, monkey-patch and decorators library. It is useful when changing"
+HOMEPAGE = "https://github.com/ionelmc/python-aspectlib"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d58b3f20fd10347a9458b8a03793b62e"
+
+SRC_URI[sha256sum] = "d275ec82c4c2712e564bb760e4accff8f061f648e38774feabeb8b241cf3a4aa"
+
+inherit ptest pypi setuptools3
+
+SRC_URI += "file://run-ptest \
+ file://0001-Remove-tornado-6-test-constraint.-Ref-15.patch \
+ "
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS:${PN}-ptest += "\
+ python3-tornado \
+ python3-process-tests \
+"
+
+RDEPENDS:${PN} += "python3-core python3-fields"
+
+BBCLASSEXTEND = "native nativesdk"
--
2.25.1
next prev parent reply other threads:[~2022-05-17 8:17 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 ` mingli.yu [this message]
2022-05-17 8:16 ` [PATCH 4/7] python3-py-cpuinfo: " mingli.yu
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-3-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