# Maintainer: Carlos Aznarán _base=ufl pkgname=python-fenics-${_base} pkgdesc="UFL - Unified Form Language" pkgver=2024.1.0.post1 pkgrel=1 arch=(any) url="https://github.com/FEniCS/${_base}" license=(LGPL-3.0-or-later GPL-3.0-or-later) depends=(python-numpy) makedepends=(python-build python-installer python-setuptools python-wheel) checkdepends=(python-pytest) source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz) sha512sums=('85ee948bb3b393b23635dba6c075c25211fdffaa2438309b3a4e64783be598ee474be2c52eca3dd26e6059eb85919c7c997ed1e272e740102bc7c0e7896ccf8e') provides=("python-${_base}") conflicts=("python-${_base}" "python-${_base}-git") 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 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" }