aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorea Christian <horea.christ@yandex.com>2017-03-27 18:15:39 +0200
committerJustin Lecher <jlec@gentoo.org>2017-03-27 17:15:39 +0100
commit82565e1bdb4b3f2d06f95c52597cb06f4703ebc3 (patch)
treeb09c1d26811d9d008748f76622aadecfa661b8e8
parentMerge remote-tracking branch 'github/master' (diff)
downloadsci-82565e1b.tar.gz
sci-82565e1b.tar.bz2
sci-82565e1b.zip
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
-rw-r--r--sci-biology/nilearn/nilearn-0.2.6.ebuild16
-rw-r--r--sci-biology/nilearn/nilearn-9999.ebuild16
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