summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e71019593e0c30f2332f8cff506dc76aefc3980c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=nutils
pkgname=python-${_base}
pkgdesc="Numerical Utilities for Finite Element Analysis"
pkgver=7.0
pkgrel=2
arch=(any)
url="https://github.com/evalf/${_base}"
license=(MIT)
depends=(python-numpy python-treelog python-stringly)
makedepends=(python-setuptools)
checkdepends=(python-pytest python-scipy intel-mkl python-meshio graphviz python-matplotlib) # python-nutils-si-git
optdepends=('python-scipy: for Scipy matrix backend support'
  'intel-mkl: for MKL matrix backend support'
  'python-matplotlib: for interpolation support'
  'python-meshio: for parsing gmsh files')
source=(${url}/archive/v${pkgver}.tar.gz)
sha512sums=('f991a8488620a0c4ed67e7a609501cd484cd5f131ab47b935e8bc4a6ae59daf73f5abad46b78b57c07323de652fd0d2b0516228c50395bd7cc34b46889f06aa5')

build() {
  cd ${_base}-${pkgver}
  export PYTHONHASHSEED=0
  python setup.py build
}

check() {
  cd ${_base}-${pkgver}
  MPLBACKEND=Agg python -m pytest -k 'not cli'
}

package() {
  cd ${_base}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}