blob: 254999ac1b8b34958f18ce29261ca5b3bd0844a9 (
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
82
83
84
85
86
87
88
89
90
91
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-ndcube
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python-${_pyname}-doc")
pkgver=2.2.4
pkgrel=1
pkgdesc="Package for multi-dimensional contiguious and non-contiguious coordinate aware arrays"
arch=('any')
url="https://docs.sunpy.org/projects/ndcube"
license=('BSD-2-Clause')
makedepends=('python-setuptools-scm'
'python-wheel'
'python-build'
'python-installer'
'python-sphinx-automodapi'
'python-sphinx-changelog'
'python-sphinx-gallery'
'python-sphinxext-opengraph'
'python-sunpy-sphinx-theme'
'python-pytest-doctestplus'
'python-gwcs'
'python-sunpy'
'python-mpl-animators'
'graphviz') # matplotlib <- mpl-animators
# circular deps
#checkdepends=('python-pytest-doctestplus'
# 'python-dask'
# 'python-reproject'
# 'python-specutils'
# ) # pytest-doctestplus gwcs mpl-animators sunpy{,sphinx-theme} already in makedep
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
# 'doc-use-local-fits.patch'
# "https://www.astropy.org/astropy-data/tutorials/FITS-images/HorseHead.fits"
# "https://github.com/sunpy/ndcube/raw/main/changelog/README.rst")
md5sums=('3cec71911b8b1dd2ade476b696478abd')
# 'b50513a0bb73290d65317d0d44ae9fb9'
# 'SKIP'
# 'SKIP')
#prepare() {
# cd ${srcdir}/${_pyname}-${pkgver}
# install -Dm644 -t changelog ${srcdir}/README.rst # README not needed
# mkdir -p changelog
# cp ${srcdir}/*.fits examples
# patch -Np1 -i "${srcdir}/doc-use-local-fits.patch"
# sed -e "/datfix/d" -e "/unitfix/d" -i setup.cfg
# sed -e '/ignore:FLIP/a \ ignore:pkg_resources is deprecated:DeprecationWarning' \
# -e '/ignore:FLIP/a \ ignore:jsonschema.exceptions.RefResolutionError is deprecated:DeprecationWarning' \
# sed -e '/ignore:distutils/a \ ignore:"order" was deprecated in version 0.9' \
# -e "/ignore:distutils/a \ ignore:The default kernel will change from 'Hann' to 'Gaussian'" \
# -e "/ignore:distutils/a \ ignore:The default boundary mode will change from 'ignore' to 'strict'" \
# -i setup.cfg
#}
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}
#
# pytest -vv -l -ra --color=yes -o console_output_style=count #|| warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count # -Wdefault
#}
package_python-ndcube() {
depends=('python>=3.9' 'python-gwcs>=0.18')
optdepends=('python-matplotlib>=3.5.0: plotting'
'python-mpl-animators>=1.0: plotting'
'python-reproject>=0.7.1: reproject'
'python-ndcube-doc: Documentation for ndcube')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" {LICENSE.rst,licenses/*}
install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
package_python-ndcube-doc() {
pkgdesc="Documentation for Python ndcube module"
cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../{LICENSE.rst,licenses/*}
install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
}
|