summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge2022-08-01 10:27:15 +0000
committerDavid Runge2022-08-01 10:27:15 +0000
commitca7ddc9d37cf80944e7dd7ded080d69428e33188 (patch)
treedf4ff9a1e952ab20335bab3ed11b6fd9efd5233c
parent65be80e629bdccc54304c953d680014f73c580c0 (diff)
downloadaur-ca7ddc9d37cf80944e7dd7ded080d69428e33188.tar.gz
Add python-pyspinel 1.0.3.
Add tests and report issues upstream.
-rw-r--r--PKGBUILD11
1 files changed, 11 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 13594fc2b990..a35accb50294 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,6 +10,7 @@ url="https://github.com/openthread/openthread"
license=(Apache)
depends=(python-pyserial)
makedepends=(python-build python-installer python-setuptools python-wheel)
+checkdepends=(python-pytest)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha256sums=('0a48ef767bc07485836ba085baf0ad28c0d99aac5e090521b42da55d18f06ca7')
b2sums=('3e29438b3b57395ba13a41f427671ff967413598ede16ef3ebec127b92f97b9b798e61bd0a54b3a4d8789e19be385d11a02a377fc084ec3de006a35e1262a60c')
@@ -19,6 +20,16 @@ build() {
python -m build --wheel --no-isolation
}
+check() {
+ local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ cd $_name-$pkgver
+ # install to temporary location, as importlib is used
+ python -m installer --destdir=test_dir dist/*.whl
+ export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+ # ignore broken tests: https://github.com/openthread/openthread/issues/7962
+ pytest -vv -k 'not(test_callback or test_prop_get or test_hdlc_encode or test_prop_get)' test_dir/$_site_packages/
+}
+
package() {
cd $_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl