diff options
author | Rafael Fontenelle | 2024-04-23 16:50:02 -0300 |
---|---|---|
committer | Rafael Fontenelle | 2024-04-23 16:50:02 -0300 |
commit | 2b0506fa11d0c11d813bae8c4750c135d45dc2f2 (patch) | |
tree | 4c172db5b5a3b3f7fa7c7a8ddbb6db2eabd71e31 /PKGBUILD | |
parent | 18feff76097ff9504c353b484623c537ec06a02e (diff) | |
download | aur-2b0506fa11d0c11d813bae8c4750c135d45dc2f2.tar.gz |
Add check() function
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |