summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-03-17 18:24:48 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-03-18 20:10:29 +0000
commit74951654691dd578db646dec8591eab10f642667 (patch)
tree48c703ea3a892c6df11b6229bc71ee6ed31cf169 /dev-python/astropy
parentdev-python/ccdproc: Version bump (diff)
downloadgentoo-74951654691dd578db646dec8591eab10f642667.tar.gz
gentoo-74951654691dd578db646dec8591eab10f642667.tar.bz2
gentoo-74951654691dd578db646dec8591eab10f642667.zip
dev-python/astropy: Version bump
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-python/astropy')
-rw-r--r--dev-python/astropy/Manifest1
-rw-r--r--dev-python/astropy/astropy-1.1.2.ebuild98
-rw-r--r--dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch35
-rw-r--r--dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch37
4 files changed, 171 insertions, 0 deletions
diff --git a/dev-python/astropy/Manifest b/dev-python/astropy/Manifest
index f32eecc24a33..3d6860409651 100644
--- a/dev-python/astropy/Manifest
+++ b/dev-python/astropy/Manifest
@@ -1,2 +1,3 @@
DIST astropy-1.0.6.tar.gz 7632331 SHA256 1a0190ad420323b9bd8f7b29995a39580d7d59c5329c825bb5abb52e2f7b936d SHA512 84e02204bc55d3bd6e0e891dc56ab218d1deb65882d5d771b3f80c2a11790f77c103b0c0d5537f1842d98f0d3ded19039c82482c15147edadac89e9707537b40 WHIRLPOOL b20e5c2e3677485eaf22c71c7e3461443d4a92bf7b0e649f5e0153e0b1d46741958e983b743aa30bf07ad971a0c865e53211963653ddf814a5d4362f36f07b02
DIST astropy-1.1.1.tar.gz 8157305 SHA256 4d2e7a8bd5191a66d7e1a52beefb4a0b6f496a1e9e8212422613219cb514769f SHA512 bc3c370da32d5f0098dbfc2808dba9d4d4424d3dcfba4d7ffd84b39569387b79ad93086e10678c259237f9cfe1229725501d0dc4eba51c9d01a4cd8a72024fb4 WHIRLPOOL 5b40955f56e6f080ad93b224eabd345565ef9f5e7f5ccb00e2737bd714117bc9b35922a044fe4ccaddb9d30fa72e13dd560577392120bfbd0a9d10c8aaa5aa01
+DIST astropy-1.1.2.tar.gz 8059713 SHA256 6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad1 SHA512 b83c4a1415a3eb8c016507705d0d2f22971e4da937bb97953eec08f8f856933d8fa76ce8c536122235b19e7879b16add2e20fd2fee3e488f9b2b4bf1b9f4dbdb WHIRLPOOL 01cdfd33c29f7128e88be3f53b7ecdec37d95ba06acae6ceeba83746e0454aa220396fb00519b30639ac01b5b297fad004488d34856295735e04924d154c4eb9
diff --git a/dev-python/astropy/astropy-1.1.2.ebuild b/dev-python/astropy/astropy-1.1.2.ebuild
new file mode 100644
index 000000000000..c3bd9617fbbd
--- /dev/null
+++ b/dev-python/astropy/astropy-1.1.2.ebuild
@@ -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
+
+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-2.1.0:0=
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/numpy[${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.1.2-fix-for-pytest-28.patch"
+ "${FILESDIR}/${PN}-1.1.2-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
+ 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
+}
diff --git a/dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch b/dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch
new file mode 100644
index 000000000000..d4a8fa072c5d
--- /dev/null
+++ b/dev-python/astropy/files/astropy-1.1.2-cfitsio-338.patch
@@ -0,0 +1,35 @@
+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
+@@ -4,6 +4,7 @@
+
+ import math
+ import os
++import re
+ import time
+ import warnings
+
+@@ -1010,7 +1011,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):
+ """
+@@ -1265,8 +1266,8 @@
+
+ with fits.open(self.temp('test.fits'),
+ disable_image_compression=True) as h:
+- assert h[1].header['TFORM1'] == '1PB(30)'
+- assert h[1].header['TFORM2'] == '1PB(359)'
++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM1'])
++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM2'])
+
+ def test_compression_update_header(self):
+ """Regression test for
diff --git a/dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch b/dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch
new file mode 100644
index 000000000000..0d62e9c963a4
--- /dev/null
+++ b/dev-python/astropy/files/astropy-1.1.2-fix-for-pytest-28.patch
@@ -0,0 +1,37 @@
+From e904df784b91fd45e7dfcdec0713c471bb03efff Mon Sep 17 00:00:00 2001
+From: Thomas Robitaille <thomas.robitaille@gmail.com>
+Date: Fri, 1 Jan 2016 19:36:39 +0000
+Bug: https://bugs.debian.org/812648
+Bug: https://github.com/astropy/astropy/pull/4349
+Subject: [PATCH] Fixes to pytest plugins for pytest >= 2.8.0
+--- a/astropy/tests/pytest_plugins.py
++++ b/astropy/tests/pytest_plugins.py
+@@ -161,7 +161,10 @@
+ # handling __doctest_skip__) doesn't happen.
+ def collect(self):
+ if self.fspath.basename == "conftest.py":
+- module = self.config._conftest.importconftest(self.fspath)
++ try:
++ module = self.config._conftest.importconftest(self.fspath)
++ except AttributeError: # pytest >= 2.8.0
++ module = self.config.pluginmanager._importconftest(self.fspath)
+ else:
+ try:
+ module = self.fspath.pyimport()
+@@ -191,8 +194,14 @@
+ def runtest(self):
+ # satisfy `FixtureRequest` constructor...
+ self.funcargs = {}
+- self._fixtureinfo = doctest_plugin.FuncFixtureInfo((), [], {})
+- fixture_request = doctest_plugin.FixtureRequest(self)
++ try:
++ self._fixtureinfo = doctest_plugin.FuncFixtureInfo((), [], {})
++ fixture_request = doctest_plugin.FixtureRequest(self)
++ except AttributeError: # pytest >= 2.8.0
++ python_plugin = config.pluginmanager.getplugin('python')
++ self._fixtureinfo = python_plugin.FuncFixtureInfo((), [], {})
++ fixture_request = python_plugin.FixtureRequest(self)
++
+ failed, tot = doctest.testfile(
+ str(self.fspath), module_relative=False,
+ optionflags=opts, parser=DocTestParserPlus(),