diff mbox series

[meta-python,2/2] python3-arrow: add ptest, update backend and runtime dependencies

Message ID 20240305155211.593816-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-python,1/2] python3-types-python-dateutil: add recipe | expand

Commit Message

Alper Ak March 5, 2024, 3:52 p.m. UTC
* Upstream provides a pyproject.toml which declares a flit_core.buildapi build backend instead of setuptools.

* Updated runtime dependencies.

* Ptest and library example tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_SLOW_META_PYTHON

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

Testsuite summary
TOTAL: 1839
PASS: 1836
SKIP: 1
XFAIL: 1
FAIL: 0
XPASS: 1
ERROR: 0
DURATION: 146
END: /usr/lib/python3-arrow/ptest
2024-03-05T12:57
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 1839
PASS: 1836
SKIP: 1
XFAIL: 1
FAIL: 0
XPASS: 1
ERROR: 0
DURATION: 130
END: /usr/lib/python3-arrow/ptest
2024-03-05T12:51
STOP: ptest-runner
TOTAL: 1 FAIL: 0

XFAIL AND XPASS known issue with humanize month limits

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-arrow/run-ptest            |  3 ++
 .../python/python3-arrow_1.3.0.bb             | 30 ++++++++++++++++---
 3 files changed, 30 insertions(+), 4 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-arrow/run-ptest
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 65a45c4b6..99cae21b2 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -75,6 +75,7 @@  PTESTS_FAST_META_PYTHON = "\
 "
 
 PTESTS_SLOW_META_PYTHON = "\
+    python3-arrow \
     python3-lz4 \
     python3-yappi \
 "
diff --git a/meta-python/recipes-devtools/python/python3-arrow/run-ptest b/meta-python/recipes-devtools/python/python3-arrow/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-arrow/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb b/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb
index 90ba5de96..c1b7c1a43 100644
--- a/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb
+++ b/meta-python/recipes-devtools/python/python3-arrow_1.3.0.bb
@@ -1,13 +1,35 @@ 
 SUMMARY = "Better dates and times for Python"
-HOMEPAGE = "https://github.com/crsmithdev/arrow"
+HOMEPAGE = "https://github.com/arrow-py/arrow"
 SECTION = "devel/python"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=14a2e29a9d542fb9052d75344d67619d"
 
 SRC_URI[sha256sum] = "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85"
 
-inherit setuptools3 pypi
+inherit pypi python_flit_core ptest
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+    python3-dateutil-zoneinfo \
+    python3-pytest \
+    python3-pytest-mock \
+    python3-pytz \
+    python3-simplejson \
+    python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
 
 RDEPENDS:${PN} += " \
-        python3-dateutil \
-        "
+    python3-compression \
+    python3-dateutil \
+    python3-dateutil-zoneinfo \
+    python3-json \
+    python3-types-python-dateutil \
+"