commit: 82565e1bdb4b3f2d06f95c52597cb06f4703ebc3
Author: Horea Christian <horea.christ <AT> yandex <DOT> com>
AuthorDate: Mon Mar 27 16:15:39 2017 +0000
Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
CommitDate: Mon Mar 27 16:15:39 2017 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=82565e1b
sci-biology/nilearn: importing system joblib (#762)
* sci-biology/nilearn: importing system joblib
Package-Manager: Portage-2.3.4, Repoman-2.3.2
* sci-biology/nilearn: declaring local variable
Package-Manager: Portage-2.3.4, Repoman-2.3.2
sci-biology/nilearn/nilearn-0.2.6.ebuild | 16 +++++++++++++++-
sci-biology/nilearn/nilearn-9999.ebuild | 16 +++++++++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/sci-biology/nilearn/nilearn-0.2.6.ebuild
b/sci-biology/nilearn/nilearn-0.2.6.ebuild
index a6834596c..003d1753a 100644
--- a/sci-biology/nilearn/nilearn-0.2.6.ebuild
+++ b/sci-biology/nilearn/nilearn-0.2.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -27,6 +27,20 @@ RDEPEND="
sci-libs/nibabel[${PYTHON_USEDEP}]
plot? ( dev-python/matplotlib[${PYTHON_USEDEP}] )"
+# upstream is reluctant to *not* depend on bundled scikits_learn:
+# https://github.com/nilearn/nilearn/pull/1398
+python_prepare_all() {
+ local f
+ for f in nilearn/{*/*/,*/,}*.py; do
+ sed -r \
+ -e '/^from/s/(sklearn|\.|)\.externals\.joblib/joblib/' \
+ -e 's/from (sklearn|\.|)\.externals import/import/' \
+ -i $f || die
+ done
+
+ distutils-r1_python_prepare_all
+}
+
python_test() {
echo "backend: Agg" > matplotlibrc
MPLCONFIGDIR=. nosetests -v || die
diff --git a/sci-biology/nilearn/nilearn-9999.ebuild
b/sci-biology/nilearn/nilearn-9999.ebuild
index dcaa0ade5..d92ca884f 100644
--- a/sci-biology/nilearn/nilearn-9999.ebuild
+++ b/sci-biology/nilearn/nilearn-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -28,6 +28,20 @@ RDEPEND="
sci-libs/nibabel[${PYTHON_USEDEP}]
plot? ( dev-python/matplotlib[${PYTHON_USEDEP}] )"
+# upstream is reluctant to *not* depend on bundled scikits_learn:
+# https://github.com/nilearn/nilearn/pull/1398
+python_prepare_all() {
+ local f
+ for f in nilearn/{*/*/,*/,}*.py; do
+ sed -r \
+ -e '/^from/s/(sklearn|\.|)\.externals\.joblib/joblib/' \
+ -e 's/from (sklearn|\.|)\.externals import/import/' \
+ -i $f || die
+ done
+
+ distutils-r1_python_prepare_all
+}
+
python_test() {
echo "backend: Agg" > matplotlibrc
MPLCONFIGDIR=. nosetests -v || die