Skip to contentSkip to conversation

python3-yappi: upgrade 1.4.0 -> 1.6.0; fix ptests

PATCH New Tim Orling 1 participant 1 message Dec 24, 2023

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH 1/1 python3-yappi: upgrade 1.4.0 -> 1.6.0; fix ptests

* Switch to the python_setuptools_build_meta PEP-517 backend
* Refactor and submit 0001-Fix-imports-for-ptests.patch
- split out the Windows -> Unix line endings conversion
- https://github.com/sumerc/yappi/pull/164
* Drop 0002-add-3.11-to-the-setup.patch; upstream added 3.11 and 3.12
* Drop install of yappi.py in ptest; use site-packages as intended
* Drop complex run-ptest and simply run 'pytest --automake'
* Move out of "problems" group to "slow" group in ptest-packageslists-meta-python.inc
- can now build meta-python-image-ptest-python3-yappi
- tests take about 45 seconds

https://github.com/sumerc/yappi/blob/1.6.0/CHANGELOG

1.6.0 (2023-12-07)

- Drop support 2.7-3.5 and clean backward compatible code (pull/152)
- Add Python 3.12 wheels

1.5.1 (2023-12-06)

- Add support for Python 3.12
- Fix child callgrind functions disappear

---
All tests pass on qemux86-64
Upstream GitHub Actions CI also passed with submitted patches

 .../ptest-packagelists-meta-python.inc        |   2 +-
 ...nality-convert-line-endings-to-Unix.patch} | 120 +++++-------------
 ...port-of-tests.utils-to-enable-pytest.patch | 101 +++++++++++++++
 .../0002-add-3.11-to-the-setup.patch          |  26 ----
 .../python/python3-yappi/run-ptest            |   2 +-
 .../python/python3-yappi_1.4.0.bb             |  36 ------
 .../python/python3-yappi_1.6.0.bb             |  37 ++++++
 7 files changed, 175 insertions(+), 149 deletions(-)
 rename meta-python/recipes-devtools/python/python3-yappi/{0001-Fix-imports-for-ptests.patch => 0001-test_functionality-convert-line-endings-to-Unix.patch} (95%)
 create mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch
 delete mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch
 delete mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb
 create mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -1
index 3272d98192..e1732c6177 100644
@@ -54,6 +54,7 @@ PTESTS_FAST_META_PYTHON = "\
 
 PTESTS_SLOW_META_PYTHON = "\
     python3-lz4 \
+    python3-yappi \
 "
 
 PTESTS_PROBLEMS_META_PYTHON ="\
@@ -82,6 +83,5 @@ PTESTS_PROBLEMS_META_PYTHON ="\
     python3-whoosh \
     python3-ujson \
     python3-xlrd \
-    python3-yappi \
     python3-yarl \
 "
meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch renamed from meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch +35 -85

237 lines not on this page · raw message

meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch new file +101 -0

101 lines not on this page · raw message

meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch deleted +0 -26
deleted file mode 100644
index d40bd2b7cc..0000000000
@@ -1,26 +0,0 @@
-From 38afdacf526410f970afc58e147c7377c6c7112c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=BCmer=20Cip?= <[email protected]>
-Date: Fri, 25 Nov 2022 15:58:03 +0300
-Subject: [PATCH 2/2] add 3.11 to the setup
-
----
-Upstream-Status: Pending
-
- setup.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/setup.py b/setup.py
-index d006787..96e2a66 100644
---- a/setup.py
-+++ b/setup.py
-@@ -56,6 +56,7 @@ CLASSIFIERS = [
-     'Programming Language :: Python :: 3.8',
-     'Programming Language :: Python :: 3.9',
-     'Programming Language :: Python :: 3.10',
-+    'Programming Language :: Python :: 3.11',
-     'Programming Language :: Python :: Implementation :: CPython',
-     'Operating System :: OS Independent',
-     'Topic :: Software Development :: Libraries',
--- 
-2.30.2
-
meta-python/recipes-devtools/python/python3-yappi/run-ptest +1 -1
index 3385d68939..8d2017d39c 100644
@@ -1,3 +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/SKIPED/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}}'
+pytest --automake
meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0 -36
deleted file mode 100644
index 71e74e86f2..0000000000
@@ -1,36 +0,0 @@
-SUMMARY  = "Yet Another Python Profiler"
-HOMEPAGE = "https://github.com/sumerc/yappi"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee"
-
-SRC_URI[sha256sum] = "504b5d8fc7433736cb5e257991d2e7f2946019174f1faec7b2fe947881a17fc0"
-
-SRC_URI += " \
-    file://run-ptest \
-    file://0001-Fix-imports-for-ptests.patch \
-    file://0002-add-3.11-to-the-setup.patch \
-"
-
-inherit pypi setuptools3 ptest
-
-RDEPENDS:${PN} += "\
-    ${PYTHON_PN}-datetime \
-    ${PYTHON_PN}-pickle \
-    ${PYTHON_PN}-threading \
-"
-
-RDEPENDS:${PN}-ptest += " \
-    ${PYTHON_PN}-gevent \
-    ${PYTHON_PN}-multiprocessing \
-    ${PYTHON_PN}-pytest \
-    ${PYTHON_PN}-profile \
-    ${PYTHON_PN}-zopeinterface \
-"
-
-do_install_ptest() {
-    install -d ${D}${PTEST_PATH}/tests
-    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-    cp -f ${S}/yappi/yappi.py ${D}/${PTEST_PATH}/
-}
-
meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +37 -0
new file mode 100644
index 0000000000..4349cab1e7
@@ -0,0 +1,37 @@
+SUMMARY  = "Yet Another Python Profiler"
+HOMEPAGE = "https://github.com/sumerc/yappi"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee"
+
+SRC_URI[sha256sum] = "a9aaf72009d8c03067294151ee0470ac7a6dfa7b33baab40b198d6c1ef00430a"
+
+SRC_URI += " \
+    file://run-ptest \
+    file://0001-test_functionality-convert-line-endings-to-Unix.patch \
+    file://0002-Fix-import-of-tests.utils-to-enable-pytest.patch \
+"
+
+inherit pypi python_setuptools_build_meta ptest
+
+RDEPENDS:${PN} += "\
+    python3-datetime \
+    python3-pickle \
+    python3-threading \
+"
+
+RDEPENDS:${PN}-ptest += " \
+    python3-gevent \
+    python3-multiprocessing \
+    python3-pytest \
+    python3-profile \
+    python3-unittest-automake-output \
+    python3-zopeinterface \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests ${D}${PTEST_PATH}
+    cp -f ${S}/run_tests.py ${D}${PTEST_PATH}
+}
+
Signature · 1 line
2.34.1