From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/astropy/files/, dev-python/astropy/
Date: Mon, 14 Sep 2015 11:55:56 +0000 (UTC) [thread overview]
Message-ID: <1442231754.9bfc3cd91fb88333c88bd9b6e2976a64f1bc99e2.jlec@gentoo> (raw)
commit: 9bfc3cd91fb88333c88bd9b6e2976a64f1bc99e2
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 14 11:39:58 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Sep 14 11:55:54 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bfc3cd9
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 <AT> gentoo.org>
dev-python/astropy/astropy-1.0.4.ebuild | 31 +++++++-----
.../files/astropy-1.0.4-system-configobj.patch | 14 ++++++
.../files/astropy-1.0.4-system-pytest.patch | 14 ++++++
.../astropy/files/astropy-1.0.4-system-six.patch | 12 +++++
dev-python/astropy/files/astropy-ply.py | 58 ++++++++++++++++++++++
5 files changed, 116 insertions(+), 13 deletions(-)
diff --git a/dev-python/astropy/astropy-1.0.4.ebuild b/dev-python/astropy/astropy-1.0.4.ebuild
index 88cd6a8..e8700ab 100644
--- a/dev-python/astropy/astropy-1.0.4.ebuild
+++ b/dev-python/astropy/astropy-1.0.4.ebuild
@@ -20,6 +20,8 @@ IUSE="doc test"
RDEPEND="
>=dev-libs/expat-2.1.0:0=
dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/ply[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
>=sci-astronomy/erfa-1.2:0=
>=sci-astronomy/wcslib-4.25:0=
>=sci-libs/cfitsio-3.350:0=
@@ -42,16 +44,23 @@ DEPEND="${RDEPEND}
sci-libs/scipy[${PYTHON_USEDEP}]
)"
-PATCHES=( "${FILESDIR}/${P}-disable_helper.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-disable_helper.patch"
+ "${FILESDIR}/${P}-system-six.patch"
+ "${FILESDIR}/${P}-system-pytest.patch"
+ "${FILESDIR}/${P}-system-configobj.patch"
+ )
python_prepare_all() {
+ export mydistutilsargs="--offline"
rm -r ${PN}_helpers || die
- rm -r cextern/*/* || die
- distutils-r1_python_prepare_all
-}
+ cp "${FILESDIR}"/astropy-ply.py astropy/extern/ply.py || die
+ rm -r cextern/{expat,erfa,cfitsio,wcslib} || die
+
+ echo "[build]" >> setup.cfg
+ echo "use_system_libraries=1" >> setup.cfg
-python_compile() {
- distutils-r1_python_compile --use-system-libraries --offline
+ distutils-r1_python_prepare_all
}
python_compile_all() {
@@ -60,19 +69,15 @@ python_compile_all() {
VARTEXFONTS="${T}"/fonts \
MPLCONFIGDIR="${BUILD_DIR}" \
PYTHONPATH="${BUILD_DIR}"/lib \
- esetup.py build_sphinx --offline
+ esetup.py build_sphinx
fi
}
python_test() {
- esetup.py --offline test
-}
-
-python_install() {
- distutils-r1_python_install --offline --use-system-libraries
+ py.test -vv -k "not test_web_profile" astropy || die
}
python_install_all() {
use doc && local HTML_DOCS=( docs/_build/html/. )
- distutils-r1_python_install_all --offline
+ 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-pytest.patch b/dev-python/astropy/files/astropy-1.0.4-system-pytest.patch
new file mode 100644
index 0000000..638f7e8
--- /dev/null
+++ b/dev-python/astropy/files/astropy-1.0.4-system-pytest.patch
@@ -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:
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-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))
next reply other threads:[~2015-09-14 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 11:55 Justin Lecher [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-18 18:09 [gentoo-commits] repo/gentoo:master commit in: dev-python/astropy/files/, dev-python/astropy/ Sebastien Fabbro
2016-03-18 19:18 Sebastien Fabbro
2016-06-09 17:24 Sebastien Fabbro
2016-12-28 23:44 Sebastien Fabbro
2017-06-26 4:35 Sebastien Fabbro
2017-06-28 4:02 Sebastien Fabbro
2017-07-10 18:50 Sebastien Fabbro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442231754.9bfc3cd91fb88333c88bd9b6e2976a64f1bc99e2.jlec@gentoo \
--to=jlec@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox