blob: 5d67353736968229085b112d0e02992c21436d17 (
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
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=mystic
pkgname=python-${_base}
pkgdesc="highly-constrained non-convex optimization and uncertainty quantification"
pkgver=0.4.3
pkgrel=1
url="https://github.com/uqfoundation/${_base}"
arch=(any)
license=(BSD-3-Clause)
depends=(python-numpy python-sympy python-klepto)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest)
optdepends=('python-scipy: for SciPy optimization'
'python-pathos: for for parallel computing'
'python-pyina: for for parallel computing'
'python-matplotlib: for Matplotlib rendering')
source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('156d0bb1d08d9008b0b6ac30e00aba4b4588a895188b5143de4ff742675628de41f887afda4bd793cc5b281046a9ab245b21076ff944db29ee10a144e0e41eb9')
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 ${_base}/tests \
--ignore=${_base}/tests/test_collapse.py \
--ignore=${_base}/tests/test_collapsed.py \
--ignore=${_base}/tests/test_1d2d_expect.py \
--ignore=${_base}/tests/test_boundsconstrained.py \
--ignore=${_base}/tests/test_solver_compare.py \
--ignore=${_base}/tests/test_solver_constraints.py \
--ignore=${_base}/tests/test_solver_sanity.py \
--ignore=${_base}/tests/test_solver_suite.py \
--ignore=${_base}/tests/test_symbolic_basic.py \
--ignore=${_base}/tests/test_termination.py \
--ignore=${_base}/tests/test_vectorize.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}"
}
|