blob: 3b4a4ed27b12a46b316286d7e1083ff40fd59fee (
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
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-galpy
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}")
#"python-${_pyname}-doc")
_torus_commit="b7bf7965db8c3b2034d6a92f5a1c1fefe13e0e5d"
pkgver=1.9.2
pkgrel=1
pkgdesc="Galactic Dynamics in python"
arch=('i686' 'x86_64')
url="https://www.galpy.org"
license=('BSD-3-Clause')
makedepends=('python-setuptools' 'gsl'
'python-wheel'
'python-build'
'python-installer')
#checkdepends=('python-pytest'
# 'python-astropy'
# 'python-scipy'
# 'python-matplotlib')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
"torus-200307.tar.gz::https://github.com/jobovy/Torus/archive/${_torus_commit}.tar.gz")
md5sums=('844b300bc57e9ead0190abc9552b0084'
'f84f68196975d1efbac800b1a5703c45')
get_pyver() {
python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
}
prepare() {
# cd ${srcdir}/${_pyname}-${pkgver}/${_pyname}/snapshot
cd ${srcdir}/${_pyname}-${pkgver}
mv ${srcdir}/{Torus-${_torus_commit},${_pyname}-${pkgver}/galpy/actionAngle/actionAngleTorus_c_ext/torus}
# sed -i 's/numpy.float)/numpy.float64)/' galpy/util/leung_dop853.py
# sed -i "/directnbody/s/directnbody/.directnbody/" Snapshot.py
# sed -i "/from\ Snapshot/s/Snapshot/.Snapshot/" snapshotMovies.py
}
build() {
cd ${srcdir}/${_pyname}-${pkgver}
python -m build --wheel --no-isolation
# msg "Building Docs"
# python setup.py build_docs
}
#check() {
# # takes a lot of time
# cd ${srcdir}/${_pyname}-${pkgver}
#
# PYTHONPATH="build/lib.linux-${CARCH}-cpython-$(get_pyver):${PYTHONPATH}" pytest -vv -l -ra --color=yes -o console_output_style=count \
# --ignore=tests/test_amuse.py \
# --ignore=tests/test_snapshotpotential.py \
# --ignore=tests/test_sphericaldf.py \
# --deselect=tests/test_actionAngle.py::test_actionAngleAdiabaticGrid_basicAndConserved_actions \
# --deselect=tests/test_actionAngle.py::test_actionAngleStaeckelGrid_basicAndConserved_actions \
# --deselect=tests/test_actionAngle.py::test_actionAngleIsochroneApprox_triaxialnfw_linear_angles \
# --deselect=tests/test_actionAngle.py::test_actionAngleVerticalInverse_orbit_interpolation_pointtransform \
# --deselect=tests/test_actionAngle.py::test_actionAngleVerticalInverse_wrtVertical_interpolation_pointtransform \
# --deselect=tests/test_actionAngle.py::test_actionAngleVerticalInverse_freqs_wrtVertical_interpolation_pointtransform \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_flat_kurtosisvt \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_flat_skewvt \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_powerfall_skewvt \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_powerfall_kurtosisvt \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_powerrise_kurtosisvt \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_flat_oortA \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_powerrise_oortA \
# --deselect=tests/test_diskdf.py::test_dehnendf_cold_powerrise_srst \
# --deselect=tests/test_dynamfric.py::test_dynamfric_c \
# --deselect=tests/test_evolveddiskdf.py::test_mildnonaxi_vertexdev_direct \
# --deselect=tests/test_evolveddiskdf.py::test_mildnonaxi_oortA_grid \
# --deselect=tests/test_evolveddiskdf.py::test_elliptical_cold_oortABCK_position1 \
# --deselect=tests/test_evolveddiskdf.py::test_elliptical_cold_oortABCK_position2 \
# --deselect=tests/test_galpypaper.py::test_diskdf \
# --deselect=tests/test_interp_potential.py::test_interpolation_potential_force_c \
# --deselect=tests/test_orbit.py::test_liouville_planar \
# --deselect=tests/test_orbit.py::test_analytic_ecc_rperi_rap \
# --deselect=tests/test_potential.py::test_poisson_surfdens_potential \
# --deselect=tests/test_potential.py::test_McMillan17 \
# --deselect=tests/test_potential.py::test_Cautun20 \
# --deselect=tests/test_potential.py::test_DehnenBinney98 \
# --deselect=tests/test_pv2qdf.py::test_pvTvz_staeckel \
# --deselect=tests/test_pv2qdf.py::test_pvTvz_staeckel_diffngl \
# --deselect=tests/test_qdf.py::test_sampleV_interpolate \
# --deselect=tests/test_quantity.py::test_streamgapdf_method_returntype \
# --deselect=tests/test_scf.py::test_scf_compute_spherical_nbody_hernquist \
# --deselect=tests/test_scf.py::test_scf_compute_nbody_twopowertriaxial \
# --deselect=tests/test_streamdf.py::test_bovy14_callMargXZ \
# --deselect=tests/test_streamdf.py::test_bovy14_callMargDPMLL \
# --deselect=tests/test_streamdf.py::test_fardalpot_trackaa \
# --deselect=tests/test_streamdf.py::test_fardalwmwpot_trackaa \
# --deselect=tests/test_streamgapdf.py::test_sanders15_setup \
# --deselect=tests/test_streamgapdf.py::test_sanders15_leading_setup \
# --deselect=tests/test_streamgapdf.py::test_sample \
# --deselect=tests/test_streamgapdf.py::test_sample_offset \
# --deselect=tests/test_streamgapdf.py::test_sample_offset_leading \
# --deselect=tests/test_streamgapdf_impulse.py::test_impulse_deltav_general_fullintegration_zeroforce \
# --deselect=tests/test_streamspraydf.py::test_center || warning "Tests failed"
#
## nosetests
#}
package_python-galpy() {
depends=('python-packaging' 'python-scipy' 'python-matplotlib')
optdepends=('python-galpy-doc: Documentation for galpy'
'gsl>=1.14: For some advanced features'
'python-astropy: For Quantity support'
'python-astroquery: For the Orbit.from_name initialization method'
'python-numexpr: For or plotting arbitrary expressions of Orbit quantities'
'python-numba: for speeding up the evaluation of certain functions when using C orbit integration'
'python-jax: For use of constant-anisotropy DFs in galpy.df.constantbetadf'
'python-tqdm: For displaying a progress bar for certain operations (e.g., orbit integration of multiple objects at once'
'python-pynbody: Foruse of SnapshotRZPotential and InterpSnapshotRZPotential')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README* -t "${pkgdir}/usr/share/doc/${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
#package_python-galpy-doc() {
# pkgdesc="Documentation for Python Radio Beam module"
# cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
#
# install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
# cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
#}
|