blob: 0d1179693eda651ebeb300a4b39e332798ed3994 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Maintainer: Gerasimos Chourdakis <chourdak at in dot tum dot de>
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=micro-manager
pkgname=python-${_base}-precice
pkgdesc="A tool which facilitates two-scale macro-micro coupled simulations using preCICE"
pkgver=0.5.0
pkgrel=1
arch=(any)
url="https://precice.org/tooling-${_base}-overview.html"
license=(LGPL-3.0-or-later)
depends=(python-pyprecice)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-scikit-learn python-h5py-openmpi pybind11)
optdepends=('python-scikit-learn: for crash handling by interpolation'
'python-h5py: for snapshot computations')
source=(${_base}-${pkgver}.tar.gz::https://github.com/precice/${_base}/archive/v${pkgver}.tar.gz)
sha512sums=('ae78aee94ba673750685f0bcfb7c71637f1fb3413d4c3f29bb9735f04b79dab054052bd3d8423ebb9d38e3c2783a22137951e6f816a3e9e3487b73fdce73ae3d')
prepare() {
sed -i 's/GPL/LGPL/' ${_base}-${pkgver}/pyproject.toml
sed -i 's/GNU/GNU Lesser/' ${_base}-${pkgver}/pyproject.toml
}
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
cd ${srcdir}/${_base}-${pkgver}/tests/integration/test_unit_cube
${srcdir}/${_base}-${pkgver}/test-env/bin/micro-manager-precice micro-manager-config-local-adaptivity.json &
${srcdir}/${_base}-${pkgver}/test-env/bin/python unit_cube.py
${srcdir}/${_base}-${pkgver}/test-env/bin/micro-manager-precice micro-manager-config-global-adaptivity.json &
${srcdir}/${_base}-${pkgver}/test-env/bin/python unit_cube.py
cd ${srcdir}/${_base}-${pkgver}/tests/unit
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_micro_manager.py
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_interpolation.py
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_micro_simulation_crash_handling.py
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_hdf5_functionality.py
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_snapshot_computation.py
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_domain_decomposition.py
${srcdir}/${_base}-${pkgver}/test-env/bin/python -m unittest test_adaptivity_serial.py
cd ${srcdir}/${_base}-${pkgver}/examples
${srcdir}/${_base}-${pkgver}/test-env/bin/micro-manager-precice micro-manager-python-config.json &
${srcdir}/${_base}-${pkgver}/test-env/bin/python macro_dummy.py
${srcdir}/${_base}-${pkgver}/test-env/bin/micro-manager-precice micro-manager-python-adaptivity-config.json &
${srcdir}/${_base}-${pkgver}/test-env/bin/python macro_dummy.py
pushd cpp-dummy
c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) micro_cpp_dummy.cpp -o micro_dummy$(python3-config --extension-suffix)
popd
${srcdir}/${_base}-${pkgver}/test-env/bin/micro-manager-precice micro-manager-cpp-config.json &
${srcdir}/${_base}-${pkgver}/test-env/bin/python macro_dummy.py
${srcdir}/${_base}-${pkgver}/test-env/bin/micro-manager-precice micro-manager-cpp-adaptivity-config.json &
${srcdir}/${_base}-${pkgver}/test-env/bin/python macro_dummy.py
}
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}"
}
|