summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRafael Fontenelle2024-04-23 16:50:02 -0300
committerRafael Fontenelle2024-04-23 16:50:02 -0300
commit2b0506fa11d0c11d813bae8c4750c135d45dc2f2 (patch)
tree4c172db5b5a3b3f7fa7c7a8ddbb6db2eabd71e31 /PKGBUILD
parent18feff76097ff9504c353b484623c537ec06a02e (diff)
downloadaur-2b0506fa11d0c11d813bae8c4750c135d45dc2f2.tar.gz
Add check() function
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD9
1 files changed, 9 insertions, 0 deletions
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