summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD9
2 files changed, 10 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6ddf6fcbf10b..2eb89b549264 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,6 +5,7 @@ pkgbase = pyg3t-git
url = https://gitlab.com/pyg3t/pyg3t
arch = any
license = GPL-3.0-or-later
+ checkdepends = python-pytest
makedepends = git
makedepends = python-setuptools
makedepends = python-build
diff --git a/PKGBUILD b/PKGBUILD
index b27031a09512..51af62789bb0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,6 +10,7 @@ url="https://gitlab.com/pyg3t/pyg3t"
license=(GPL-3.0-or-later)
depends=(python)
makedepends=(git python-setuptools python-build python-installer python-wheel)
+checkdepends=(python-pytest)
provides=($_name)
conflicts=($_name)
source=(git+${url}.git)
@@ -28,6 +29,14 @@ build() {
python -m build --wheel --no-isolation
}
+# Workaround for the tests requiring installed scripts (poselect, etc.)
+check() {
+ cd $_name
+ python -m installer --destdir='tmp_dir' dist/*.whl
+ export PATH="$PWD/tmp_dir/usr/bin:$PATH"
+ PYTHONPATH=$PWD python -m pytest
+}
+
package() {
cd $_name
python -m installer --destdir="$pkgdir" dist/*.whl