summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcqzw5552024-04-09 15:51:19 +0800
committercqzw5552024-04-09 15:51:19 +0800
commit09cea0a1a7e25a24867e94fa91981bf26ec0be3c (patch)
tree508c46368e56a1bed506a1c1180b683e02efca8b
parentd823d833e37422ff8afa30d9f093256a6cec920b (diff)
downloadaur-09cea0a1a7e25a24867e94fa91981bf26ec0be3c.tar.gz
implement testing in PKGBUILD check()
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
2 files changed, 14 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cc81bbf25996..c26084bc8247 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,12 @@
pkgbase = python-visvis
pkgdesc = Python library for visualization of 1D to 4D data
pkgver = 1.14.0.r3.gd8f36d4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/almarklein/visvis
arch = any
license = BSD-3-Clause
+ checkdepends = python-pytest
+ makedepends = git
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
diff --git a/PKGBUILD b/PKGBUILD
index 3e4a73af1692..f7f72eb59aeb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,11 @@
+# Maintainer: cqz5555 < cqzw555@163.com >
# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
pkgname=python-visvis
pkgver=1.14.0.r3.gd8f36d4
_commit=d8f36d4b33554a24918c7043188ccffcc054690e
-pkgrel=1
+pkgrel=2
pkgdesc="Python library for visualization of 1D to 4D data"
url="https://github.com/almarklein/visvis"
arch=('any')
@@ -18,6 +19,7 @@ depends=(
'python-scipy'
)
makedepends=(
+ 'git'
'python-build'
'python-installer'
'python-setuptools'
@@ -32,6 +34,9 @@ optdepends=(
'python-pyqt6: for a Qt6 GUI backend'
'python-wxpython: for the WxWidgets GUI backend'
)
+checkdepends=(
+ 'python-pytest'
+)
source=("${pkgname}::git+${url}.git#commit=${_commit}")
b2sums=('SKIP')
@@ -56,6 +61,11 @@ build() {
python -m build --wheel --no-isolation
}
+check(){
+ cd "${pkgname}"
+ PYTHONPATH="$PWD/build/lib" pytest
+}
+
package() {
cd "${pkgname}"
python -m installer --destdir="$pkgdir/" dist/*.whl