summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2017-02-14 15:46:45 +0900
committerBenda Xu <heroxbd@gentoo.org>2017-02-14 15:47:08 +0900
commitd71430e877ec01acffeb3f9d988c09103c0fb78a (patch)
treec67010c1c95973eb1aab3126cc6ae316862e9bf0 /sci-libs/scikits_learn
parentsci-libs/scikits_learn: version bump. (diff)
downloadgentoo-d71430e877ec01acffeb3f9d988c09103c0fb78a.tar.gz
gentoo-d71430e877ec01acffeb3f9d988c09103c0fb78a.tar.bz2
gentoo-d71430e877ec01acffeb3f9d988c09103c0fb78a.zip
sci-libs/scikits_learn: version bump.
Fix joblib ImportError by replacing all bundled joblib imports with the system one. Bug: 609136 590296 Package-Manager: portage-2.3.3
Diffstat (limited to 'sci-libs/scikits_learn')
-rw-r--r--sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild19
1 files changed, 8 insertions, 11 deletions
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 75452bc99b48..8f668c735b58 100644
--- a/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
+++ b/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
@@ -56,20 +56,17 @@ python_prepare_all() {
export SCIPY_FCONFIG="config_fc --noopt --noarch"
# use system joblib
- rm -r sklearn/externals/joblib/* || die
- echo "from joblib import *" > sklearn/externals/joblib/__init__.py
- sed -i -e '/joblib\/test/d' sklearn/externals/setup.py || die
- sed -i -e 's/..externals.joblib/ joblib/g' \
- sklearn/cross_validation.py \
- sklearn/decomposition/tests/test_sparse_pca.py \
- sklearn/metrics/pairwise.py || die
+ 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
+ done
rm sklearn/externals/funcsigs.py || die
rm sklearn/externals/odict.py || die
- sed -e 's:from ..externals.funcsigs import signature:from funcsigs import signature:g' \
- -i sklearn/utils/fixes.py || die
- sed -e 's:from sklearn.externals.funcsigs import signature:from funcsigs import signature:g' \
- -i sklearn/gaussian_process/{tests/test_,}kernels.py || die
+ for f in sklearn/{utils/fixes.py,gaussian_process/{tests/test_,}kernels.py}; do
+ sed -r -e 's/from (sklearn|\.|)\.externals\.funcsigs/from funcsigs/' -i $f || die
+ done
distutils-r1_python_prepare_all
}