blob: 007380d3c78d58d1bbc41fe824c3f0f9447b70bd (
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
36
37
38
39
40
41
42
43
44
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=py-pde
pkgname=python-${_base}
pkgdesc="Python package for solving partial differential equations"
pkgver=0.25.0
pkgrel=1
arch=(any)
url="https://github.com/zwicker-group/${_base}"
license=(MIT)
depends=(python-matplotlib python-numba python-scipy python-sympy python-tqdm)
makedepends=(python-build python-installer python-setuptools-scm python-wheel)
# checkdepends=(python-pytest python-h5py python-pandas napari)
optdepends=('python-h5py: for storing data in the hierarchical file format'
'python-pandas: for handling tabular data'
'napari: for displaying images interactively'
'python-ipywidgets: for interactive widgets'
'python-numba-mpi: for njittable MPI wrapper'
'python-mpi4py: for parallel processing using MPI')
source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('0a25c72e1868059ad96938472de610af3c4c070980e7ecb08bc669ccd4d673fab26ebb6e51eef79edb3c5a6af0484038ba092348b2c254598d130a9374ddc379')
build() {
cd ${_base}-${pkgver}
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
}
# check() {
# cd ${_base}-${pkgver}/tests
# python -m venv --system-site-packages test-env
# test-env/bin/python -m installer dist/*.whl
# MPLBACKEND=Agg NUMBA_WARNINGS=1 test-env/bin/python run_tests.py --unit # --use_mpi
# }
package() {
cd ${_base}-${pkgver}
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d ${pkgdir}/usr/share/licenses/${pkgname}
ln -s "${site_packages}/${_base/-/_}-${pkgver}.dist-info/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|