commit:     7bcb0eb7500285331e1539812462d8155a2939b0
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 11:32:43 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 11:32:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bcb0eb7

sci-libs/scikits_learn: sed to counter more bundled imports

  e.g.  from sklearn.externals import joblib

Package-Manager: portage-2.3.3

 sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild 
b/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
index 8f668c735b..865735d2a0 100644
--- a/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
+++ b/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
@@ -59,7 +59,8 @@ python_prepare_all() {
        rm -r sklearn/externals/joblib || die
        sed -i -e '/joblib/d' sklearn/externals/setup.py || die
        for f in sklearn/{*/,}*.py; do
-               sed -r -e 's/from (sklearn|\.|)\.externals\.joblib/from 
joblib/' -i $f || die
+               sed -r -e '/^from/s/(sklearn|\.|)\.externals\.joblib/joblib/' \
+                       -e 's/from (sklearn|\.|)\.externals import/import/' -i 
$f || die
        done
 
        rm sklearn/externals/funcsigs.py || die

Reply via email to