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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
# Contributor: Nabobalis <nabil dot freij at gmail dot com>
pkgbase=python-sunpy
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}")
#"python-${_pyname}-doc")
pkgver=6.0.4
pkgrel=1
pkgdesc="Python library for solar physics"
arch=('i686' 'x86_64')
url="https://sunpy.org"
license=('BSD-2-Clause')
makedepends=('python-setuptools-scm>=6.2'
'python-build'
'python-installer'
'python-extension-helpers'
'python-numpy') # wheel required by new setuptools
#'python-sunpy-sphinx-theme'
#'python-parfive' 'python-astroquery' 'python-reproject' 'python-ruamel-yaml' 'python-jplephem' 'python-sphinx-automodapi' 'python-sphinx-changelog' 'python-sphinx-gallery>=0.9.0' 'python-sphinxext-opengraph'
#'python-scikit-image' 'python-h5netcdf' 'python-sqlalchemy' 'python-lxml' 'python-zeep' 'python-drms' 'python-aioftp' 'python-asdf' 'python-cdflib' 'python-mpl-animators' 'graphviz')
#checkdepends=('python-pytest'
#checkdepends=('python-pytest-xdist'
# 'python-pytest-arraydiff'
# 'python-pytest-doctestplus'
# 'python-pytest-remotedata'
# 'python-pytest-astropy'
# 'python-astropy'
# 'python-asdf'
# 'python-requests'
# 'python-dateutil'
# 'python-matplotlib'
# 'python-dask'
# 'python-bokeh'
# 'python-jinja'
# 'python-pytest-mpl'
# 'python-pytest-mock'
# 'python-reproject'
# 'python-asdf-astropy'
# 'python-parfive'
# 'python-scipy'
# 'python-beautifulsoup4'
# 'python-lxml'
# 'python-zeep'
# 'python-drms'
# 'python-hypothesis'
# 'python-scikit-image'
# 'python-h5netcdf'
# 'python-cdflib'
# 'python-mpl-animators'
# 'python-glymur'
# 'python-hvpy'
# 'python-opencv'
## 'python-astroquery'
# 'python-aioftp'
# 'python-jplephem'
#) # matplotlib <-mpl-animater, aiohttp <- parfive, asdf <- asdf-astropy, dateutil <- pandas <- drms
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063301_0131_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063302_0171_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063302_0211_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063303_0335_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063305_0094_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063305_1600_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063307_0193_cutout.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063307_0193_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_063931_0193_cutout.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_064555_0193_cutout.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_065219_0193_cutout.fits"
# "http://data.sunpy.org/sunpy/v1/AIA20110607_065843_0193_cutout.fits"
# "http://data.sunpy.org/sunpy/v1/BIR_20110607_062400_10.fit"
# "http://data.sunpy.org/sunpy/v1/HMI20110607_063211_los_lowres.fits"
# "http://data.sunpy.org/sunpy/v1/LOFAR_70MHZ_20190409_131136.fits"
# "http://data.sunpy.org/sunpy/v1/aiacalibim5.fits.gz"
# "http://data.sunpy.org/sunpy/v1/eit_l1_20110607_203753.fits"
# "http://data.sunpy.org/sunpy/v1/go1520110607.fits"
# "http://data.sunpy.org/sunpy/v1/hsi_image_20110607_063300.fits"
# "http://data.sunpy.org/sunpy/v1/hsi_obssumm_20110607_025.fits"
# "http://data.sunpy.org/sunpy/v1/lyra_20110607-000000_lev3_std.fits"
# "http://data.sunpy.org/sunpy/v1/swap_lv1_20110607_063329.fits"
# "http://data.sunpy.org/sunpy/v1/tca110607.fits"
# "http://data.sunpy.org/sunpy/v1/20110607_EVE_L0CS_DIODES_1m.txt"
# "http://data.sunpy.org/sunpy/v1/20110607SRS.txt"
# "http://data.sunpy.org/sunpy/v1/aiacalibim5.fits.gz"
# "http://data.sunpy.org/sunpy/v1/glg_cspec_n5_110607_v00.pha")
## "http://netdrms01.nispdc.nso.edu/VSO/WSDL/VSOi_rpc_literal.wsdl")
md5sums=('6d05c8a13d413c0908008c41e3f42c0b')
# 'bde3bd7a691b38e2e4c4e1d17b143b24'
# '01efaf052d81efc32a92050a249aa557'
# 'ead6d3ce4c183c471d76bf1bc3be44a3'
# 'f4cd5c25bbd1809a683d0f5ec19ce92a'
# '3d3e003b2da7e79134b28323bd8f4204'
# '651f43e3623ab76189b7130ca40decb6'
# '5f850633b03243fc465031d2cd4d0c9e'
# 'fb7ffd090d572492654474e13e0785a6'
# 'cc14e401e0142766095a12afd7cd9697'
# 'ae40a715c140700f2f98b47340727fea'
# 'fb8381aeb3f62e500f53275c314de97f'
# 'b33f2e9c909dee5e30c5742ceb2fbbc4'
# 'e0979dcbf4a794f97cae3314a4e815ea'
# '0df5b0cf427798e8ee646c114ef21e78'
# 'ad292afb23c4995da34a0e11cd52641a'
# '4dda208f27f5632a810b063160d8f300'
# 'e74eaba34d16f912f43cdf9fc52da969'
# '93180b3b0b1062e1c2036810dbe70372'
# '207638019e7f1bf68a91edc2a52cf63e'
# '5ff9c24279256a1fd1c7df3424984190'
# '62645078df18e245bfd7b42eda9285b2'
# '2a05632e58ac56bcd927835e5cbe487f'
# 'd9536b9b25d9f15cd2b20a16acfe11a7'
# '06ce74d25cfdb3d19667d5682562745c'
# '83341ef73b722cb250cfd7755f32f2b8'
# '4dda208f27f5632a810b063160d8f300'
# 'b1255ddcf10d91ae81439aadfe8cbccd')
# '09e93384ceff4aecfef1ad4b0ca89290')
get_pyinfo() {
[[ $1 == "site" ]] && python -c "import site; print(site.getsitepackages()[0])" || \
python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
}
#prepare() {
# cd ${srcdir}/${_pyname}-${pkgver}
#
## mkdir -p ${HOME}/.local/share/${_pyname}
## cp -v ${srcdir}/*.fit* ${HOME}/.local/share/${_pyname}
## cp -v ${srcdir}/*.txt ${HOME}/.local/share/${_pyname}
## cp -v ${srcdir}/*.pha ${HOME}/.local/share/${_pyname}
# sed -i "/oldest-supported-numpy/d" pyproject.toml
#}
build() {
cd ${srcdir}/${_pyname}-${pkgver}
python -m build --wheel --no-isolation --skip-dependency-check
# msg "Building Docs"
# cd ${srcdir}/${_pyname}-${pkgver}/docs
# ln -rs ${srcdir}/${_pyname}-${pkgver}/${_pyname}*egg-info \
# ../build/lib.linux-${CARCH}-$(get_pyver)/${_pyname}-${pkgver}-py$(get_pyver).egg-info
# mkdir -p ${HOME}/.local/share/${_pyname}
# ln -rs ${srcdir}/*.fit* ${HOME}/.local/share/${_pyname}
# ln -rs ${srcdir}/*.txt ${HOME}/.local/share/${_pyname}
# ln -rs ${srcdir}/*.pha ${HOME}/.local/share/${_pyname}
# ln -rs ${srcdir}/VSOi_rpc_literal.wsdl .
# PYTHONPATH="../build/lib.linux-${CARCH}-$(get_pyver)" make html
}
#check() {
# cd ${srcdir}/${_pyname}-${pkgver}
#
# ln -rs ${srcdir}/${_pyname}-${pkgver}/${_pyname}*egg-info \
# build/lib.linux-${CARCH}-cpython-$(get_pyinfo)/${_pyname}-${pkgver}-py$(get_pyinfo .).egg-info
## mkdir -p ${HOME}/.local/share/${_pyname}
## ln -rs ${srcdir}/*.fit* ${HOME}/.local/share/${_pyname}
## ln -rs ${srcdir}/*.txt ${HOME}/.local/share/${_pyname}
## ln -rs ${srcdir}/*.pha ${HOME}/.local/share/${_pyname}
## PYTHONPATH="build/lib.linux-${CARCH}-$(get_pyver)" pytest "build/lib.linux-${CARCH}-$(get_pyver)" -vv -l -ra --color=yes -o console_output_style=count #|| warning "Tests failed" -vv -l -ra --color=yes -o console_output_style=count --remote-data=any -p xdist -n 4
# # From NixOS, remove tests needs hvpy, spicepy
# PYTHONPATH="build/lib.linux-${CARCH}-cpython-$(get_pyinfo)" pytest -vv -l -ra --color=yes -o console_output_style=count "build/lib.linux-${CARCH}-cpython-$(get_pyinfo)" docs -Wdefault --remote-data -p xdist -n 4 \
# --ignore=build/lib.linux-${CARCH}-cpython-$(get_pyinfo)/sunpy/net/tests/test_fido.py \
# --ignore=build/lib.linux-${CARCH}-cpython-$(get_pyinfo)/sunpy/coordinates/tests/test_spice.py \
# --deselect=build/lib.linux-x86_64-cpython-312/sunpy/net/hek2vso/tests/test_hek2vso.py::test_full_query \
# --deselect=build/lib.linux-x86_64-cpython-312/docs/whatsnew/5.0.rst::5.0.rst \
# --deselect=build/lib.linux-x86_64-cpython-312/docs/tutorial/acquiring_data/index.rst::index.rst \
# --deselect=docs/tutorial/acquiring_data/hek.rst::hek.rst
# #|| warning "Tests failed" -vv -l -ra --color=yes -o console_output_style=count
#}
package_python-sunpy() {
depends=('python>=3.10' 'python-astropy>=5.3.0' 'python-parfive>=2.0.0' 'python-aioftp' 'python-packaging>=23.0' 'python-requests>=2.28.0')
optdepends=('python-asdf>=2.13.0: asdf'
'python-asdf-astropy>=0.4.0: asdf'
'python-dask>=2022.5.2: dask'
'python-scikit-image>=0.18.0: image'
'python-scipy>1.10.0: image, map'
'python-reproject>=0.9.0: map'
'python-matplotlib>=3.5.0: map, timeseries, visualization'
'python-mpl-animators>=1.0.0: map, visualization'
'python-glymur>0.11.0: jpeg2000'
'python-lxml>5.0.0: jpeg2000'
'python-beautifulsoup4>=4.11.0: net'
'python-drms>=0.7.1: net'
'python-dateutil>=2.8.1: net'
'python-tqdm>=4.64.0: net'
'python-zeep>=4.1.0: net'
'python-scikit-image>=0.19.0: scikit-image'
'python-cdflib>1.0.0: timeseries'
'python-h5netcdf>=1.0.0: timeseries'
'python-h5py>=3.7.0: timeseries'
'python-pandas>=1.4.0: timeseries')
# 'python-sunpy-doc: Documentation for SunPy')
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
# rm -r ${pkgdir}/$(get_pyinfo site)/{docs,examples,licenses}
}
#package_python-sunpy-doc() {
# pkgdesc="Documentation for Python SunPy module"
# cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
#
## install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../licenses/*
# 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}"
#}
|