mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-python/astropy: version bump. fix also xdg sandboxing issue
Gentoo-Bug: 587700 Package-Manager: portage-2.3.0
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST astropy-1.1.2.tar.gz 8059713 SHA256 6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad1 SHA512 b83c4a1415a3eb8c016507705d0d2f22971e4da937bb97953eec08f8f856933d8fa76ce8c536122235b19e7879b16add2e20fd2fee3e488f9b2b4bf1b9f4dbdb WHIRLPOOL 01cdfd33c29f7128e88be3f53b7ecdec37d95ba06acae6ceeba83746e0454aa220396fb00519b30639ac01b5b297fad004488d34856295735e04924d154c4eb9
|
||||
DIST astropy-1.2.1.tar.gz 8179665 SHA256 0d7ef702166f26fed239b59fc12edcd5243ca5bf562a36202fd8c6b0270d6e48 SHA512 2ef37537a4c6b2ec50a1d898f600978475c9c5d2cb66ba19d06782656e9ddcb4aa6a8e53217e318448cedac45dac0dce0d8cc2fe94cddc15ebb306b3b0794595 WHIRLPOOL d37374f23a0121fdc92fa572facc248f0a571dacb8edcf1a9d0987d6a40287de199262ec01f654bd6ea5aece826e5588d2869558152adffe9ab490fa46f2e36d
|
||||
|
||||
98
dev-python/astropy/astropy-1.2.1.ebuild
Normal file
98
dev-python/astropy/astropy-1.2.1.ebuild
Normal file
@@ -0,0 +1,98 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5} )
|
||||
|
||||
inherit distutils-r1 xdg-utils
|
||||
|
||||
DESCRIPTION="Core functionality for performing astrophysics with Python"
|
||||
HOMEPAGE="http://astropy.org/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc test"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/expat:0=
|
||||
dev-python/configobj[${PYTHON_USEDEP}]
|
||||
>=dev-python/numpy-1.10[${PYTHON_USEDEP}]
|
||||
dev-python/ply[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
>=sci-astronomy/erfa-1.2:0=
|
||||
>=sci-astronomy/wcslib-5:0=
|
||||
sci-libs/cfitsio:0=
|
||||
sys-libs/zlib:0="
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-python/astropy-helpers-1.1[${PYTHON_USEDEP}]
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
media-gfx/graphviz
|
||||
$(python_gen_cond_dep 'dev-libs/libxml2[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'dev-python/h5py[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'dev-python/matplotlib[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'dev-python/sphinx[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'dev-python/wcsaxes[${PYTHON_USEDEP}]' python2_7)
|
||||
$(python_gen_cond_dep 'sci-libs/scipy[${PYTHON_USEDEP}]'python2_7)
|
||||
)
|
||||
test? (
|
||||
dev-libs/libxml2[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/h5py[${PYTHON_USEDEP}]
|
||||
dev-python/matplotlib[${PYTHON_USEDEP}]
|
||||
sci-libs/scipy[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.0.4-system-six.patch"
|
||||
"${FILESDIR}/${PN}-1.0.4-system-configobj.patch"
|
||||
"${FILESDIR}/${PN}-1.1.1-mark-kown-failures.patch"
|
||||
"${FILESDIR}/${PN}-1.2.1-cfitsio-338.patch"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
|
||||
}
|
||||
|
||||
python_prepare_all() {
|
||||
export mydistutilsargs="--offline"
|
||||
export ASTROPY_USE_SYSTEM_PYTEST=True
|
||||
rm -r ${PN}_helpers || die
|
||||
cp "${FILESDIR}"/astropy-ply.py astropy/extern/ply.py || die
|
||||
rm -r cextern/{expat,erfa,cfitsio,wcslib} || die
|
||||
sed -i -e '/auto_use/s/True/False/' setup.cfg || die
|
||||
cat >> setup.cfg <<-EOF
|
||||
[build]
|
||||
use_system_libraries=1
|
||||
EOF
|
||||
xdg_environment_reset
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
python_setup "python2*"
|
||||
VARTEXFONTS="${T}"/fonts \
|
||||
MPLCONFIGDIR="${BUILD_DIR}" \
|
||||
PYTHONPATH="${BUILD_DIR}"/lib \
|
||||
esetup.py build_sphinx
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
16
dev-python/astropy/files/astropy-1.2.1-cfitsio-338.patch
Normal file
16
dev-python/astropy/files/astropy-1.2.1-cfitsio-338.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
Author: Ole Streicher <olebole@debian.org>
|
||||
Description: Make TFORMx check more flexible
|
||||
The maximal column length in cfitsio changed between version 3370 and 3380.
|
||||
This patch checks their syntax, without a specific length.
|
||||
Bug: https://github.com/astropy/astropy/issues/4646
|
||||
--- a/astropy/io/fits/tests/test_image.py
|
||||
+++ b/astropy/io/fits/tests/test_image.py
|
||||
@@ -1070,7 +1070,7 @@
|
||||
hdu.writeto(self.temp('test.fits'))
|
||||
|
||||
with fits.open(self.temp('test.fits')) as hdul:
|
||||
- assert (hdul['SCI'].data == cube).all()
|
||||
+ assert np.abs(hdul['SCI'].data - cube).max() < 1./15.
|
||||
|
||||
def test_subtractive_dither_seed(self):
|
||||
"""
|
||||
Reference in New Issue
Block a user