summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-04-23 19:49:15 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-04-23 19:49:15 +0000
commit4225896a33241b6559c2108687c10ce3f65e57ff (patch)
treec711fce3b4b9666ee8af72fb9367cf8ac8d15a39 /sci-libs/scikits_learn
parentkeyword ~x86-fbsd (diff)
downloadgentoo-2-4225896a33241b6559c2108687c10ce3f65e57ff.tar.gz
gentoo-2-4225896a33241b6559c2108687c10ce3f65e57ff.tar.bz2
gentoo-2-4225896a33241b6559c2108687c10ce3f65e57ff.zip
Added a patch which makes sure cblas stock libraries are used instead of bundled ATLAS library. Fixed doc generation with sphinx to link datasets in plot generation
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/scikits_learn')
-rw-r--r--sci-libs/scikits_learn/ChangeLog11
-rw-r--r--sci-libs/scikits_learn/files/0.10-atlas.patch56
-rw-r--r--sci-libs/scikits_learn/scikits_learn-0.10-r1.ebuild (renamed from sci-libs/scikits_learn/scikits_learn-0.10.ebuild)23
-rw-r--r--sci-libs/scikits_learn/scikits_learn-0.9.ebuild78
4 files changed, 79 insertions, 89 deletions
diff --git a/sci-libs/scikits_learn/ChangeLog b/sci-libs/scikits_learn/ChangeLog
index 9cd780fa21dc..b6b1e5b69321 100644
--- a/sci-libs/scikits_learn/ChangeLog
+++ b/sci-libs/scikits_learn/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-libs/scikits_learn
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scikits_learn/ChangeLog,v 1.10 2012/02/05 01:58:26 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scikits_learn/ChangeLog,v 1.11 2012/04/23 19:49:14 bicatali Exp $
+
+*scikits_learn-0.10-r1 (23 Apr 2012)
+
+ 23 Apr 2012; Sébastien Fabbro <bicatali@gentoo.org> +files/0.10-atlas.patch,
+ -scikits_learn-0.9.ebuild, -scikits_learn-0.10.ebuild,
+ +scikits_learn-0.10-r1.ebuild:
+ Added a patch which makes sure cblas stock libraries are used instead of
+ bundled ATLAS library. Fixed doc generation with sphinx to link datasets in
+ plot generation
05 Feb 2012; Mike Gilbert <floppym@gentoo.org> scikits_learn-0.10.ebuild,
scikits_learn-0.9.ebuild:
diff --git a/sci-libs/scikits_learn/files/0.10-atlas.patch b/sci-libs/scikits_learn/files/0.10-atlas.patch
new file mode 100644
index 000000000000..4d1743dc7a34
--- /dev/null
+++ b/sci-libs/scikits_learn/files/0.10-atlas.patch
@@ -0,0 +1,56 @@
+This patch remove the hardcoding on cblas which was assuming only ATLAS
+provides a cblas implementation.
+bicatali - apr 2012
+
+diff -Nur scikit-learn-0.10.orig/sklearn/cluster/setup.py scikit-learn-0.10/sklearn/cluster/setup.py
+--- scikit-learn-0.10.orig/sklearn/cluster/setup.py 2012-01-11 13:48:21.000000000 +0000
++++ scikit-learn-0.10/sklearn/cluster/setup.py 2012-04-23 19:59:54.000000000 +0100
+@@ -10,8 +10,7 @@
+ from numpy.distutils.system_info import get_info
+
+ blas_info = get_info('blas_opt', 0)
+- if (not blas_info) or (
+- ('NO_ATLAS_INFO', 1) in blas_info.get('define_macros', [])):
++ if (not blas_info):
+ cblas_libs = ['cblas']
+ blas_info.pop('libraries', None)
+ else:
+diff -Nur scikit-learn-0.10.orig/sklearn/linear_model/setup.py scikit-learn-0.10/sklearn/linear_model/setup.py
+--- scikit-learn-0.10.orig/sklearn/linear_model/setup.py 2012-01-11 13:48:21.000000000 +0000
++++ scikit-learn-0.10/sklearn/linear_model/setup.py 2012-04-23 20:00:44.000000000 +0100
+@@ -9,8 +9,7 @@
+
+ # cd fast needs CBLAS
+ blas_info = get_info('blas_opt', 0)
+- if (not blas_info) or (
+- ('NO_ATLAS_INFO', 1) in blas_info.get('define_macros', [])):
++ if (not blas_info):
+ cblas_libs = ['cblas']
+ blas_info.pop('libraries', None)
+ else:
+diff -Nur scikit-learn-0.10.orig/sklearn/setup.py scikit-learn-0.10/sklearn/setup.py
+--- scikit-learn-0.10.orig/sklearn/setup.py 2012-01-11 13:48:21.000000000 +0000
++++ scikit-learn-0.10/sklearn/setup.py 2012-04-23 20:39:34.000000000 +0100
+@@ -44,8 +44,7 @@
+
+ # 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', [])):
++ if (not blas_info):
+ config.add_library('cblas',
+ sources=[join('src', 'cblas', '*.c')])
+ warnings.warn(BlasNotFoundError.__doc__)
+diff -Nur scikit-learn-0.10.orig/sklearn/utils/setup.py scikit-learn-0.10/sklearn/utils/setup.py
+--- scikit-learn-0.10.orig/sklearn/utils/setup.py 2012-01-11 13:48:21.000000000 +0000
++++ scikit-learn-0.10/sklearn/utils/setup.py 2012-04-23 20:02:13.000000000 +0100
+@@ -12,8 +12,7 @@
+
+ # cd fast needs CBLAS
+ blas_info = get_info('blas_opt', 0)
+- if (not blas_info) or (
+- ('NO_ATLAS_INFO', 1) in blas_info.get('define_macros', [])):
++ if (not blas_info):
+ cblas_libs = ['cblas']
+ blas_info.pop('libraries', None)
+ else:
diff --git a/sci-libs/scikits_learn/scikits_learn-0.10.ebuild b/sci-libs/scikits_learn/scikits_learn-0.10-r1.ebuild
index a3515e78b380..d54d3ce63cf8 100644
--- a/sci-libs/scikits_learn/scikits_learn-0.10.ebuild
+++ b/sci-libs/scikits_learn/scikits_learn-0.10-r1.ebuild
@@ -1,20 +1,19 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scikits_learn/scikits_learn-0.10.ebuild,v 1.2 2012/02/05 01:58:26 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scikits_learn/scikits_learn-0.10-r1.ebuild,v 1.1 2012/04/23 19:49:14 bicatali Exp $
EAPI=4
-inherit flag-o-matic
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
DISTUTILS_SRC_TEST="setup.py"
-inherit distutils multilib
+inherit distutils multilib flag-o-matic
MYPN="${PN/scikits_/scikit-}"
-DESCRIPTION="A set of python modules for machine learning and data mining"
+DESCRIPTION="Python modules for machine learning and data mining"
HOMEPAGE="http://scikit-learn.org"
SRC_URI="mirror://sourceforge/${MYPN}/${MYPN}-${PV}.tar.gz"
@@ -36,6 +35,7 @@ DEPEND="${CDEPEND}
S="${WORKDIR}/${MYPN}-${PV}"
src_prepare() {
+ epatch "${FILESDIR}"/${PV}-atlas.patch
# use stock libsvm
cat <<-EOF >> site.cfg
[libsvm]
@@ -53,10 +53,14 @@ src_compile() {
distutils_src_compile
if use doc; then
cd "${S}/doc"
- export VARTEXFONTS="${T}"/fonts
- MPLCONFIGDIR="${S}/build-$(PYTHON -f --ABI)" \
- PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
- emake html latex
+ local d=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*)
+ ln -s "${S}"/sklearn/datasets/{data,descr,images} \
+ "${d}"/sklearn/datasets
+ VARTEXFONTS="${T}"/fonts \
+ MPLCONFIGDIR="${S}/build-$(PYTHON -f --ABI)" \
+ PYTHONPATH="${d}" \
+ emake html
+ rm -r "${d}"/sklearn/datasets/{data,desr,images}
fi
}
@@ -68,7 +72,6 @@ src_install() {
}
python_execute_function -q remove_scikits
insinto /usr/share/doc/${PF}
- use doc && doins "${DISTDIR}"/scikits.learn.pdf && \
- doins -r build/sphinx/html
+ use doc && dohtml -r doc/_build/html
use examples && doins -r examples
}
diff --git a/sci-libs/scikits_learn/scikits_learn-0.9.ebuild b/sci-libs/scikits_learn/scikits_learn-0.9.ebuild
deleted file mode 100644
index c41d9e23968a..000000000000
--- a/sci-libs/scikits_learn/scikits_learn-0.9.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scikits_learn/scikits_learn-0.9.ebuild,v 1.4 2012/02/05 01:58:26 floppym Exp $
-
-EAPI="3"
-inherit flag-o-matic
-
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.*"
-DISTUTILS_SRC_TEST="setup.py"
-
-inherit distutils multilib
-
-MYPN="${PN/scikits_/scikit-}"
-
-DESCRIPTION="A set of python modules for machine learning and data mining"
-HOMEPAGE="http://scikit-learn.org"
-SRC_URI="mirror://sourceforge/${MYPN}/${MYPN}-${PV}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples"
-
-CDEPEND="sci-libs/scipy
- >=sci-libs/libsvm-2.91"
-RDEPEND="${CDEPEND}
- sci-libs/scikits
- dev-python/matplotlib"
-DEPEND="${CDEPEND}
- dev-python/cython
- dev-python/setuptools
- doc? ( dev-python/sphinx dev-python/matplotlib )"
-
-S="${WORKDIR}/${MYPN}-${PV}"
-
-src_prepare() {
- # use stock libsvm
- cat <<-EOF >> site.cfg
- [libsvm]
- libraries=svm
- library_dirs=${EPREFIX}/usr/$(get_libdir)
- include_dirs=${EPREFIX}/usr/include/
- EOF
- # bug #397605
- [[ ${CHOST} == *-darwin* ]] \
- && append-ldflags -bundle "-undefined dynamic_lookup" \
- || append-ldflags -shared
-}
-
-src_compile() {
- distutils_src_compile
- if use doc; then
- cd "${S}/doc"
- export VARTEXFONTS="${T}"/fonts
- MPLCONFIGDIR="${S}/build-$(PYTHON -f --ABI)" \
- PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
- emake html latex || die
- fi
-}
-
-src_install() {
- find "${S}" -name \*LICENSE.txt -delete
- distutils_src_install
- remove_scikits() {
- rm -f "${ED}"$(python_get_sitedir)/scikits/__init__.py || die
- }
- python_execute_function -q remove_scikits
- insinto /usr/share/doc/${PF}
- if use doc; then
- doins "${DISTDIR}"/scikits.learn.pdf || die
- doins -r build/sphinx/html || die
- fi
- if use examples; then
- doins -r examples || die
- fi
-}