# Maintainer: Carlos Aznarán # Contributor: Andrzej Giniewicz _base=NiaPy pkgname=python-${_base,,} pkgver=2.1.0 pkgrel=1 pkgdesc="Python micro framework for building nature-inspired algorithms" url="https://${_base}.org" arch=(any) license=(MIT) depends=(python-pandas python-matplotlib) makedepends=(python-build python-installer python-poetry-core) checkdepends=(python-pytest) source=(${_base}-${pkgver}.tar.gz::https://github.com/NiaOrg/${_base}/archive/${pkgver}.tar.gz) sha512sums=('d877a0b70ce7bf6208593d08f3f7bd4819a663e3fd3dcae57473ceef1505cf1a881ee82a7e92ebc153d8044df959800110c9915641668c90ebd9bee30fef591e') build() { cd ${_base}-${pkgver} python -m build --wheel --skip-dependency-check --no-isolation } check() { cd ${_base}-${pkgver} python -m venv --system-site-packages test-env test-env/bin/python -m installer dist/*.whl test-env/bin/python -m pytest } package() { cd ${_base}-${pkgver} PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" }