diff options
author | Iyán Méndez Veiga | 2024-01-17 14:04:24 +0100 |
---|---|---|
committer | Iyán Méndez Veiga | 2024-01-17 14:04:24 +0100 |
commit | 34f7ce6b2ebca973ac15da24907532636e39fdbd (patch) | |
tree | f524b2cd6d303e775055393956baae3b8265c066 /PKGBUILD | |
download | aur-34f7ce6b2ebca973ac15da24907532636e39fdbd.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b376a8a754c8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com> +pkgname=python-stanio-git +_name=stanio +pkgver=r28.00dd7f4 +pkgrel=1 +pkgdesc="A package to prepare inputs to Stan and reading its outputs" +arch=('any') +url="https://github.com/WardBrian/stanio" +license=('BSD-3-Clause') +depends=('python-numpy') +makedepends=( + 'git' + 'python-build' + 'python-installer' + 'python-wheel' +) +checkdepends=( + 'python-pandas' + 'python-pytest' + 'python-pytest-cov' +) +source=("${_name}::git+https://github.com/WardBrian/${_name}") +b2sums=('SKIP') + +pkgver() { + cd "${_name}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} + +build() { + cd "${_name}" + python -m build --wheel --no-isolation +} + +check() { + local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + cd "${_name}" + python -m installer --destdir=test_dir dist/*.whl + PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" pytest -v test +} + +package() { + cd "${_name}" + python -m installer --destdir="$pkgdir" dist/*.whl + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} |