summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2017-02-20 10:04:43 +0900
committerBenda Xu <heroxbd@gentoo.org>2017-02-20 10:05:12 +0900
commitdc6e7afa6c153f914af48996a1b4ec9bd4da3f76 (patch)
treee8b4bfec88c50581a0634681fbda898d4a4adb60 /sci-libs/scikits_learn
parentsys-apps/openrc: remove unstable versions (diff)
downloadgentoo-dc6e7afa6c153f914af48996a1b4ec9bd4da3f76.tar.gz
gentoo-dc6e7afa6c153f914af48996a1b4ec9bd4da3f76.tar.bz2
gentoo-dc6e7afa6c153f914af48996a1b4ec9bd4da3f76.zip
sci-libs/scikits_learn: remove bundled cblas.
use the system one. Package-Manager: portage-2.3.3
Diffstat (limited to 'sci-libs/scikits_learn')
-rw-r--r--sci-libs/scikits_learn/files/scikits_learn-0.18.1-system-cblas.patch32
-rw-r--r--sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild5
2 files changed, 37 insertions, 0 deletions
diff --git a/sci-libs/scikits_learn/files/scikits_learn-0.18.1-system-cblas.patch b/sci-libs/scikits_learn/files/scikits_learn-0.18.1-system-cblas.patch
new file mode 100644
index 000000000000..e60f64947b03
--- /dev/null
+++ b/sci-libs/scikits_learn/files/scikits_learn-0.18.1-system-cblas.patch
@@ -0,0 +1,32 @@
+Index: scikit-learn-0.18.1/sklearn/_build_utils/__init__.py
+===================================================================
+--- scikit-learn-0.18.1.orig/sklearn/_build_utils/__init__.py
++++ scikit-learn-0.18.1/sklearn/_build_utils/__init__.py
+@@ -31,7 +31,7 @@ def get_blas_info():
+ return False
+
+ blas_info = get_info('blas_opt', 0)
+- if (not blas_info) or atlas_not_found(blas_info):
++ if (not blas_info):
+ cblas_libs = ['cblas']
+ blas_info.pop('libraries', None)
+ else:
+Index: scikit-learn-0.18.1/sklearn/setup.py
+===================================================================
+--- scikit-learn-0.18.1.orig/sklearn/setup.py
++++ scikit-learn-0.18.1/sklearn/setup.py
+@@ -63,14 +63,6 @@ def configuration(parent_package='', top
+ libraries=libraries,
+ )
+
+- # some libs needs cblas, fortran-compiled BLAS will not be sufficient
+- blas_info = get_info('blas_opt', 0)
+- if (not blas_info) or (
+- ('NO_ATLAS_INFO', 1) in blas_info.get('define_macros', [])):
+- config.add_library('cblas',
+- sources=[join('src', 'cblas', '*.c')])
+- warnings.warn(BlasNotFoundError.__doc__)
+-
+ # the following packages depend on cblas, so they have to be build
+ # after the above.
+ config.add_subpackage('linear_model')
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 865735d2a028..10e75acb5e2c 100644
--- a/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
+++ b/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
@@ -46,6 +46,8 @@ DEPEND="
S="${WORKDIR}/${MYP}"
+PATCHES=( "${FILESDIR}/${P}-system-cblas.patch" )
+
python_prepare_all() {
# bug #397605
[[ ${CHOST} == *-darwin* ]] \
@@ -55,6 +57,9 @@ python_prepare_all() {
# scikits-learn now uses the horrible numpy.distutils automagic
export SCIPY_FCONFIG="config_fc --noopt --noarch"
+ # remove bundled cblas
+ rm -r sklearn/src || die
+
# use system joblib
rm -r sklearn/externals/joblib || die
sed -i -e '/joblib/d' sklearn/externals/setup.py || die