blob: b1a8bf00c9e3c894324c424740664f3db0ac0a7b (
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
74
75
76
77
78
79
80
81
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-poppy
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python-${_pyname}-doc")
pkgver=1.1.1
pkgrel=1
pkgdesc="Physical Optics Propagation in Python"
arch=('any')
url="https://poppy-optics.readthedocs.io"
license=('BSD-3-Clause')
makedepends=('python-setuptools-scm>=7.1'
'python-wheel'
'python-build'
'python-installer'
'python-sphinx-astropy'
'python-sphinx-issues'
'python-stsci_rtd_theme'
'python-nbsphinx'
'python-numpydoc'
'python-astropy'
'python-matplotlib'
'python-scipy'
'pandoc'
'graphviz')
#checkdepends=('python-pytest'
# 'python-pytest-xdist'
# 'python-numexpr'
# 'python-pyfftw'
# 'python-pyopencl'
# 'python-scikit-image'
# 'python-synphot'
#) # astropy, matplotlib, scipy already in makedepends
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('84bc97a01b2f34ea6888f04823c78937')
prepare() {
cd ${srcdir}/${_pyname}-${pkgver}
sed -i "/language\ = /s/None/'en'/" docs/conf.py
}
build() {
cd ${srcdir}/${_pyname}-${pkgver}
python -m build --wheel --no-isolation
msg "Building Docs"
PYTHONPATH="../build/lib" make -C docs html
}
#check() {
# cd ${srcdir}/${_pyname}-${pkgver}
#
# # takes long time
# pytest -vv -l -ra --color=yes -o console_output_style=count -p xdist -n 5 #|| warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count
#}
package_python-poppy() {
depends=('python>=3.9'
'python-astropy>=4.3.0'
'python-matplotlib>=3.2.0'
'python-scipy>=1.5.0')
optdepends=('python-psutil: enables slightly better automatic selection of numbers of processes for multiprocess calculations'
'python-pyfftw: speed up the FFTs used in multi-plane optical simulations'
'python-synphot: enables the simulation of PSFs'
'python-poppy-doc: Documentation for poppy')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
package_python-poppy-doc() {
pkgdesc="Documentation for Python poppy"
cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
install -D -m644 ../../LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
}
|