/[gentoo-x86]/sci-libs/scikits_learn/scikits_learn-0.11.ebuild
Gentoo

Contents of /sci-libs/scikits_learn/scikits_learn-0.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue May 8 18:47:20 2012 UTC (2 years, 5 months ago) by bicatali
Branch: MAIN
Version bump

(Portage version: 2.1.10.56/cvs/Linux x86_64)

1 bicatali 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $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 $
4    
5     EAPI=4
6    
7     PYTHON_DEPEND="2"
8     SUPPORT_PYTHON_ABIS="1"
9     RESTRICT_PYTHON_ABIS="3.*"
10     DISTUTILS_SRC_TEST="setup.py"
11    
12     inherit distutils multilib flag-o-matic
13    
14     MYPN="${PN/scikits_/scikit-}"
15    
16     DESCRIPTION="Python modules for machine learning and data mining"
17     HOMEPAGE="http://scikit-learn.org"
18     SRC_URI="mirror://sourceforge/${MYPN}/${MYPN}-${PV}.tar.gz"
19    
20     LICENSE="BSD"
21     SLOT="0"
22     KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
23     IUSE="doc examples"
24    
25     CDEPEND="sci-libs/scipy
26     >=sci-libs/libsvm-2.91"
27     RDEPEND="${CDEPEND}
28     sci-libs/scikits
29     dev-python/matplotlib"
30     DEPEND="${CDEPEND}
31     dev-python/cython
32     dev-python/setuptools
33     doc? ( dev-python/sphinx dev-python/matplotlib )"
34    
35     S="${WORKDIR}/${MYPN}-${PV}"
36    
37     src_prepare() {
38     epatch "${FILESDIR}"/0.10-atlas.patch
39     # use stock libsvm
40     cat <<-EOF >> site.cfg
41     [libsvm]
42     libraries=svm
43     library_dirs=${EPREFIX}/usr/$(get_libdir)
44     include_dirs=${EPREFIX}/usr/include/
45     EOF
46     # bug #397605
47     [[ ${CHOST} == *-darwin* ]] \
48     && append-ldflags -bundle "-undefined dynamic_lookup" \
49     || append-ldflags -shared
50     }
51    
52     src_compile() {
53     distutils_src_compile
54     if use doc; then
55     cd "${S}/doc"
56     local d=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*)
57     ln -s "${S}"/sklearn/datasets/{data,descr,images} \
58     "${d}"/sklearn/datasets
59     VARTEXFONTS="${T}"/fonts \
60     MPLCONFIGDIR="${S}/build-$(PYTHON -f --ABI)" \
61     PYTHONPATH="${d}" \
62     emake html
63     rm -r "${d}"/sklearn/datasets/{data,desr,images}
64     fi
65     }
66    
67     src_install() {
68     find "${S}" -name \*LICENSE.txt -delete
69     distutils_src_install
70     remove_scikits() {
71     rm -f "${ED}"$(python_get_sitedir)/scikits/__init__.py || die
72     }
73     python_execute_function -q remove_scikits
74     insinto /usr/share/doc/${PF}
75     use doc && dohtml -r doc/_build/html
76     use examples && doins -r examples
77     }

  ViewVC Help
Powered by ViewVC 1.1.20