blob: ae7c68170066d9ede683dcbfa470cb624db3dcf5 (
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
92
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-astrocut
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python-${_pyname}-doc")
pkgver=0.12.0
pkgrel=1
pkgdesc="Tools for making image cutouts from sets of TESS full frame images"
arch=('any')
url="https://astrocut.readthedocs.io"
license=('BSD-3-Clause')
makedepends=('python-setuptools-scm'
'python-wheel'
'python-build'
'python-installer'
'python-sphinx-astropy'
'python-sphinx_rtd_theme'
'python-matplotlib'
'python-gwcs'
'python-scipy'
'python-s3fs'
'python-s3path'
'python-cachetools'
'python-spherical_geometry')
checkdepends=('python-pytest-doctestplus'
'python-pytest-astropy-header'
# 'python-pytest-xdist'
'python-pillow') # gwcs, scipy, s3fs, s3path, cachetools, spherical_geometry already in makedepends
source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('7a636e8c46a97c3564d2923cbe146947')
#get_pyver() {
# python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
#}
prepare() {
cd ${srcdir}/${_pyname}-${pkgver}
sed -i "s/logo/logo_url/g" docs/_templates/layout.html
}
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}
# Skip tests costing lots of time
pytest \
--deselect=astrocut/tests/test_cube_cut.py::test_multithreading \
--deselect=astrocut/tests/test_cutouts.py::test_fits_cut \
--deselect=astrocut/tests/test_footprint_cutouts.py::test_cube_cut_from_footprint \
--deselect=astrocut/tests/test_footprint_cutouts.py::test_cube_cut_from_footprint_all_sequences || warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count -p xdist -n 4
# --deselect=astrocut/tests/test_make_cube.py::test_invalid_inputs \
# --deselect=astrocut/tests/test_cube_cut.py::test_s3_cube_cut \
# --deselect=astrocut/tests/test_cube_cut.py::test_s3_tica_cube_cut \
# --deselect=astrocut/tests/test_cutouts.py::test_fits_cut #|| warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count -p xdist -n 4
}
package_python-astrocut() {
depends=('python>=3.9'
'python-asdf>=2.15.0'
'python-astropy'
'python-cachetools>=5.3.2'
'python-fsspec'
'python-s3fs'
'python-requests>=2.32.3'
'python-scipy'
'python-pillow'
'python-roman-datamodels>=0.17.0'
'python-s3path>=0.5.7'
'python-spherical_geometry>=1.3.0')
optdepends=('python-astrocut-doc: Documentation for astrocut')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" licenses/*
install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.rst
python -m installer --destdir="${pkgdir}" dist/*.whl
}
package_python-astrocut-doc() {
pkgdesc="Documentation for python-astrocut"
cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../licenses/*
install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
}
|