diff options
author | Sébastien Fabbro <bicatali@gentoo.org> | 2016-02-10 20:55:36 +0000 |
---|---|---|
committer | Sébastien Fabbro <bicatali@gentoo.org> | 2016-02-10 20:57:23 +0000 |
commit | f97526841d7a209c204e43bdb9bec9a38ecc64ff (patch) | |
tree | c36ad8fd6be21b8e0cba4b71723a3955c8dc76e0 | |
parent | dev-python/astropy-helpers: Version bump (diff) | |
download | bicatali-f97526841d7a209c204e43bdb9bec9a38ecc64ff.tar.gz bicatali-f97526841d7a209c204e43bdb9bec9a38ecc64ff.tar.bz2 bicatali-f97526841d7a209c204e43bdb9bec9a38ecc64ff.zip |
dev-python/astropy: Version bump
-rw-r--r-- | dev-python/astropy/Manifest | 1 | ||||
-rw-r--r-- | dev-python/astropy/astropy-1.1.1.ebuild | 88 | ||||
-rw-r--r-- | dev-python/astropy/files/astropy-1.0.4-system-configobj.patch | 14 | ||||
-rw-r--r-- | dev-python/astropy/files/astropy-1.0.4-system-six.patch | 12 | ||||
-rw-r--r-- | dev-python/astropy/files/astropy-1.1.1-fix-wcs.patch | 15 | ||||
-rw-r--r-- | dev-python/astropy/files/astropy-1.1.1-mark-kown-failures.patch | 99 | ||||
-rw-r--r-- | dev-python/astropy/files/astropy-ply.py | 58 | ||||
-rw-r--r-- | dev-python/astropy/metadata.xml | 16 |
8 files changed, 303 insertions, 0 deletions
diff --git a/dev-python/astropy/Manifest b/dev-python/astropy/Manifest new file mode 100644 index 0000000..591f179 --- /dev/null +++ b/dev-python/astropy/Manifest @@ -0,0 +1 @@ +DIST astropy-1.1.1.tar.gz 8157305 SHA256 4d2e7a8bd5191a66d7e1a52beefb4a0b6f496a1e9e8212422613219cb514769f SHA512 bc3c370da32d5f0098dbfc2808dba9d4d4424d3dcfba4d7ffd84b39569387b79ad93086e10678c259237f9cfe1229725501d0dc4eba51c9d01a4cd8a72024fb4 WHIRLPOOL 5b40955f56e6f080ad93b224eabd345565ef9f5e7f5ccb00e2737bd714117bc9b35922a044fe4ccaddb9d30fa72e13dd560577392120bfbd0a9d10c8aaa5aa01 diff --git a/dev-python/astropy/astropy-1.1.1.ebuild b/dev-python/astropy/astropy-1.1.1.ebuild new file mode 100644 index 0000000..cbe1283 --- /dev/null +++ b/dev-python/astropy/astropy-1.1.1.ebuild @@ -0,0 +1,88 @@ +# 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-3.360: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? ( + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + media-gfx/graphviz + ) + 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}] + )" + +PATCHES=( + "${FILESDIR}/${PN}-1.0.4-system-six.patch" + "${FILESDIR}/${PN}-1.0.4-system-configobj.patch" + "${FILESDIR}/${PN}-1.1.1-fix-wcs.patch" + "${FILESDIR}/${PN}-1.1.1-mark-kown-failures.patch" +) + +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_export_best + 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.0.4-system-configobj.patch b/dev-python/astropy/files/astropy-1.0.4-system-configobj.patch new file mode 100644 index 0000000..9578c0d --- /dev/null +++ b/dev-python/astropy/files/astropy-1.0.4-system-configobj.patch @@ -0,0 +1,14 @@ +diff -ur astropy-0.4.1/astropy/config/configuration.py astropy-0.4.1.configobj/astropy/config/configuration.py +--- astropy-0.4.1/astropy/config/configuration.py 2014-09-01 22:41:30.066853605 +0200 ++++ astropy-0.4.1.configobj/astropy/config/configuration.py 2014-09-01 22:40:50.793528942 +0200 +@@ -23,7 +23,8 @@ + import types + from warnings import warn + +-from ..extern.configobj import configobj, validate ++import configobj ++import validate + from ..utils.exceptions import AstropyWarning, AstropyDeprecationWarning + from ..utils import find_current_module + from ..utils.misc import InheritDocstrings + diff --git a/dev-python/astropy/files/astropy-1.0.4-system-six.patch b/dev-python/astropy/files/astropy-1.0.4-system-six.patch new file mode 100644 index 0000000..8bfab98 --- /dev/null +++ b/dev-python/astropy/files/astropy-1.0.4-system-six.patch @@ -0,0 +1,12 @@ +diff -ur astropy-0.4.1/astropy/extern/six.py astropy-0.4.1.six/astropy/extern/six.py +--- astropy-0.4.1/astropy/extern/six.py 2014-09-01 21:57:56.663393218 +0200 ++++ astropy-0.4.1.six/astropy/extern/six.py 2014-09-01 21:59:02.940933294 +0200 +@@ -13,7 +13,7 @@ + # Update this to prevent Astropy from using its bundled copy of six + # (but only if some other version of at least _SIX_MIN_VERSION can + # be provided) +-_SIX_SEARCH_PATH = ['astropy.extern.bundled.six', 'six'] ++_SIX_SEARCH_PATH = ['six', 'astropy.extern.bundled.six'] + + + def _find_module(name, path=None): diff --git a/dev-python/astropy/files/astropy-1.1.1-fix-wcs.patch b/dev-python/astropy/files/astropy-1.1.1-fix-wcs.patch new file mode 100644 index 0000000..efb1273 --- /dev/null +++ b/dev-python/astropy/files/astropy-1.1.1-fix-wcs.patch @@ -0,0 +1,15 @@ +Author: Kacper Kowalik <xarthisius.kk@gmail.com> +Description: Copy keys to a list, since orignal map is modified +Url: https://github.com/astropy/astropy/issues/4477 +Bug: https://github.com/astropy/astropy/issues/4460 +--- a/astropy/wcs/wcs.py ++++ b/astropy/wcs/wcs.py +@@ -988,7 +988,7 @@ + """ + # Never pass SIP coefficients to wcslib + # CTYPE must be passed with -SIP to wcslib +- for key in (m.group() for m in map(SIP_KW.match, header.keys()) ++ for key in (m.group() for m in map(SIP_KW.match, list(header)) + if m is not None): + del header[key] + diff --git a/dev-python/astropy/files/astropy-1.1.1-mark-kown-failures.patch b/dev-python/astropy/files/astropy-1.1.1-mark-kown-failures.patch new file mode 100644 index 0000000..2e2c82a --- /dev/null +++ b/dev-python/astropy/files/astropy-1.1.1-mark-kown-failures.patch @@ -0,0 +1,99 @@ +Author: Ole Streicher <olebole@debian.org> +Description: Mark all known test failures as xfail. + These failures have been discussed with upstream. +--- a/astropy/io/fits/tests/test_connect.py ++++ b/astropy/io/fits/tests/test_connect.py +@@ -136,6 +136,8 @@ + # while reading is to check whether col.null is present. For float columns, col.null + # is not initialized + ++# see https://github.com/astropy/astropy/issues/3415 ++ @pytest.mark.xfail() + def test_read_from_fileobj(self, tmpdir): + filename = str(tmpdir.join('test_read_from_fileobj.fits')) + hdu = BinTableHDU(self.data) +@@ -172,6 +174,8 @@ + def setup_method(self, method): + warnings.filterwarnings('always') + ++# see https://github.com/astropy/astropy/issues/3415 ++ @pytest.mark.xfail() + def test_read(self, tmpdir): + filename = str(tmpdir.join('test_read.fits')) + self.hdus.writeto(filename) +@@ -189,6 +193,8 @@ + Table.read(filename, hdu=0) + assert exc.value.args[0] == 'No table found in hdu=0' + ++# see https://github.com/astropy/astropy/issues/3415 ++ @pytest.mark.xfail() + @pytest.mark.parametrize('hdu', [1, 'first']) + def test_read_with_hdu_1(self, tmpdir, hdu): + filename = str(tmpdir.join('test_read_with_hdu_1.fits')) +--- a/astropy/wcs/wcs.py ++++ b/astropy/wcs/wcs.py +@@ -84,6 +84,8 @@ + if six.PY3 or platform.system() == 'Windows': + __doctest_skip__ = ['WCS.all_world2pix'] + ++# see https://github.com/astropy/astropy/issues/3380 ++__doctest_skip__ = ['WCS.all_world2pix'] + + if _wcs is not None: + WCSBase = _wcs._Wcs +--- a/astropy/tests/tests/test_socketblocker.py ++++ b/astropy/tests/tests/test_socketblocker.py +@@ -66,8 +66,8 @@ + def _square(x): + return x ** 2 + +- +-@pytest.mark.skipif('not PY3_4 or sys.platform == "win32" or sys.platform.startswith("gnu0")') ++# see https://github.com/astropy/astropy/issues/4193 ++@pytest.mark.skipif(True, reason="Blocks on Debian CI test") + def test_multiprocessing_forkserver(): + """ + Test that using multiprocessing with forkserver works. Perhaps +--- a/astropy/coordinates/tests/test_api_ape5.py ++++ b/astropy/coordinates/tests/test_api_ape5.py +@@ -319,7 +319,8 @@ + # coordinate object, and one that returns a cartesian matrix but does *not* + # require `newobj` or `fk5frame` - this allows optimization of the transform. + +- ++# Temporary mark until scipy/numpy is fully on 3.5 ++@pytest.mark.xfail() + def test_highlevel_api(): + J2001 = time.Time('J2001', scale='utc') + +--- a/astropy/visualization/tests/test_histogram.py ++++ b/astropy/visualization/tests/test_histogram.py +@@ -50,6 +50,8 @@ + assert patches2[0].axes is ax[1] + + ++# see https://github.com/astropy/astropy/issues/4329 ++@pytest.mark.xfail() + @pytest.mark.skipif('not HAS_PLT') + def test_hist_autobin(rseed=0): + rng = np.random.RandomState(rseed) +--- a/astropy/table/tests/test_info.py ++++ b/astropy/table/tests/test_info.py +@@ -6,6 +6,7 @@ + import warnings + import numpy as np + ++from ...tests.helper import pytest + from ...extern import six + from ... import units as u + from ... import time +@@ -225,7 +226,8 @@ + t.info(out=out) + assert out.getvalue().splitlines() == exp + +- ++# see https://github.com/astropy/astropy/issues/4336 ++@pytest.mark.xfail() + def test_ignore_warnings(): + t = table.Table([[np.nan, np.nan]]) + with warnings.catch_warnings(record=True) as warns: diff --git a/dev-python/astropy/files/astropy-ply.py b/dev-python/astropy/files/astropy-ply.py new file mode 100644 index 0000000..19eb104 --- /dev/null +++ b/dev-python/astropy/files/astropy-ply.py @@ -0,0 +1,58 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +""" +Handle loading ply package from system or from the bundled copy +""" + +import imp +from distutils.version import StrictVersion + + +def _find_module(name, path=None): + """ + Alternative to `imp.find_module` that can also search in subpackages. + """ + + parts = name.split('.') + + for part in parts: + if path is not None: + path = [path] + + fh, path, descr = imp.find_module(part, path) + + return fh, path, descr + +_PLY_MIN_VERSION = StrictVersion('3.4') + +# Update this to prevent Astropy from using its bundled copy of ply +# (but only if some other version of at least _PLY_MIN_VERSION can +# be provided) +_PLY_SEARCH_PATH = ['ply'] + + +for mod_name in _PLY_SEARCH_PATH: + try: + mod_info = _find_module(mod_name) + #mod_lex_info = _find_module(mod_name + '.lex') + except ImportError: + continue + + mod = imp.load_module(__name__, *mod_info) + #mod_lex = imp.load_module(__name__ + '.lex', *mod_lex_info) + + try: + # if StrictVersion(mod_lex.__version__) >= _PLY_MIN_VERSION: + # break + break + except (AttributeError, ValueError): + # Attribute error if the ply module isn't what it should be and doesn't + # have a .__version__; ValueError if the version string exists but is + # somehow bogus/unparseable + continue +else: + raise ImportError( + "Astropy requires the 'ply' module of minimum version {0}; " + "normally this is bundled with the astropy package so if you get " + "this warning consult the packager of your Astropy " + "distribution.".format(_PLY_MIN_VERSION)) diff --git a/dev-python/astropy/metadata.xml b/dev-python/astropy/metadata.xml new file mode 100644 index 0000000..85615ff --- /dev/null +++ b/dev-python/astropy/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci-astronomy@gentoo.org</email> + <name>Gentoo Astronomy Project</name> + </maintainer> + <longdescription lang="en"> + Astropy is a community-driven package intended to contain much of + the core functionality and some common tools needed for performing + astronomy and astrophysics with Python. +</longdescription> + <upstream> + <remote-id type="pypi">astropy</remote-id> + </upstream> +</pkgmetadata> |