summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f417ed47f93078f19c3da097225efc22cd4684cc (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
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
# 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=5.1.2
pkgrel=1
pkgdesc="Python library for solar physics"
arch=('i686' 'x86_64')
url="https://sunpy.org"
license=('BSD-2-Clause')
makedepends=('python-setuptools-scm' 'python-wheel' 'python-build' 'python-installer' 'python-extension-helpers' 'python-numpy')
#'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-doctestplus'
#              'python-pytest-mock'
#              'python-reproject'
#              'python-aiohttp'
#              'python-parfive'
#              'python-matplotlib'
#              'python-scipy'
#              'python-beautifulsoup4'
#              'python-lxml'
#              'python-requests'
#              'python-zeep'
#              'python-drms'
#              'python-sqlalchemy'
#              'python-hypothesis'
#              'python-scikit-image'
#              'python-h5netcdf'
#              'python-glymur'
#              'python-asdf'
#              'python-mpl-animators')
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=('08dcb8c53fd8833e4ff8deac9806e437')
#        '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_pyver() {
    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

#   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}-$(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}
#    PYTHONPATH="build/lib.linux-${CARCH}-$(get_pyver)" pytest "build/lib.linux-${CARCH}-$(get_pyver)" #|| warning "Tests failed"
#}

package_python-sunpy() {
    depends=('python>=3.9' 'python-astropy>5.1.0' 'python-parfive>=2.0.0' 'python-aioftp' 'python-packaging>=19.0')
    optdepends=('python-asdf>=2.8.0: asdf'
                'python-asdf-astropy>=0.1.1: asdf'
                'python-dask>=2021.4.0: dask'
                'python-sqlalchemy>=1.3.4: database'
                'python-scikit-image>=0.18.0: image'
                'python-scipy>1.10.0: image, map'
                'python-reproject: map'
                'python-matplotlib>=3.5.0: map, timeseries, visualization'
                'python-mpl-animators>=1.0.0: map, visualization'
                'python-glymur>0.9.5: jpeg2000'
                'python-lxml>5.0.0: jpeg2000'
                'python-beautifulsoup4>=4.8.0: net'
                'python-drms<0.7.0: net'
                'python-dateutil>=2.8.0: net'
                'python-tqdm>=4.32.1: net'
                'python-zeep>=3.4.0: net'
                'python-cdflib>1.0.0: timeseries'
                'python-h5netcdf>=0.11: timeseries'
                'python-h5py>=3.1.0: timeseries'
                'python-pandas>=1.2.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
}

#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}"
#}