dev-python/astropy: Version Bump

import patches from fedora for unbundling

Closes gentoo/gentoo#10

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=556884

Package-Manager: portage-2.2.20.1
Signed-off-by: Justin Lecher <jlec@gentoo.org>
This commit is contained in:
Justin Lecher
2015-09-14 13:39:58 +02:00
parent 7bfadf5799
commit 9bfc3cd91f
5 changed files with 116 additions and 13 deletions

View File

@@ -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

View File

@@ -0,0 +1,14 @@
diff -ur astropy-1.0/astropy/tests/helper.py astropy-1.0.pytest/astropy/tests/helper.py
--- astropy-1.0/astropy/tests/helper.py 2015-02-18 22:45:32.000000000 +0100
+++ astropy-1.0.pytest/astropy/tests/helper.py 2015-02-19 16:20:28.201778929 +0100
@@ -35,8 +35,8 @@
AstropyDeprecationWarning,
AstropyPendingDeprecationWarning)
from ..config import configuration
-
-if os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules:
+# Modified by Fedora package
+if True or os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules:
import pytest
else:

View File

@@ -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):

View File

@@ -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))