aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/scikits_learn/scikits_learn-0.2.ebuild')
-rw-r--r--sci-libs/scikits_learn/scikits_learn-0.2.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/sci-libs/scikits_learn/scikits_learn-0.2.ebuild b/sci-libs/scikits_learn/scikits_learn-0.2.ebuild
new file mode 100644
index 000000000..5db2ffcdb
--- /dev/null
+++ b/sci-libs/scikits_learn/scikits_learn-0.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils
+
+MY_P="${P/scikits_/scikits.}"
+
+DESCRIPTION="A set of python modules for machine learning and data mining"
+HOMEPAGE="http://sourceforge.net/apps/trac/scikit-learn"
+SRC_URI="mirror://sourceforge/scikit-learn/${MY_P}.tar.gz
+ doc? ( http://scikit-learn.sourceforge.net/doc/scikits.learn.pdf )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND="dev-python/numpy
+ sci-libs/scikits_optimization"
+
+DEPEND="${RDEPEND}
+ dev-python/setuptools
+ doc? ( dev-python/sphinx )
+ test? ( sci-libs/scikits_optimization )"
+RESTRICT_PYTHON_ABIS="3.*"
+
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ distutils_src_compile
+ if use doc; then
+ "$(PYTHON -f)" setup.py build_sphinx || die "Generation of documentation failed"
+ fi
+}
+
+src_test() {
+ testing() {
+ PYTHONPATH="$(dir -d build-${PYTHON_ABI}/lib*)" "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" test
+ }
+ python_execute_function testing
+}
+
+src_install() {
+ find "${S}" -name \*LICENSE.txt -delete
+ distutils_src_install
+ 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
+}