blob: 41d2d107fbace07c39b14470a47e4757279e075b (
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
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-jplephem
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}")
pkgver=2.22
pkgrel=1
pkgdesc="Use a JPL ephemeris to predict planet positions"
arch=('any')
url="https://github.com/brandon-rhodes/python-jplephem"
license=('MIT')
makedepends=('python-setuptools'
'python-wheel'
'python-build'
'python-installer')
checkdepends=('python-numpy')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
"https://github.com/brandon-rhodes/python-jplephem/raw/master/ci/de405.bsp"
"https://github.com/brandon-rhodes/python-jplephem/raw/master/ci/de421.bsp"
"https://github.com/brandon-rhodes/python-jplephem/raw/master/ci/moon_pa_de421_1900-2050.bpc")
md5sums=('0e3a43b25a51f1dcd027773b1e0dd85d'
'SKIP'
'SKIP'
'SKIP')
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}
cp ${srcdir}/*de*b*p* .
}
build() {
cd ${srcdir}/${_pyname}-${pkgver}
python -m build --wheel --no-isolation
}
check() {
cd ${srcdir}/${_pyname}-${pkgver}
python -m unittest || warning "Tests failed" # discover -v
}
package_python-jplephem() {
depends=('python-numpy')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
|