Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scikits_learn/
Date: Tue, 14 Feb 2017 06:47:20
Message-Id: 1487054828.1ce3b61530ea7ad1d14c847f0d5863f702257f56.heroxbd@gentoo
1 commit: 1ce3b61530ea7ad1d14c847f0d5863f702257f56
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 14 06:07:37 2017 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 14 06:47:08 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ce3b615
7
8 sci-libs/scikits_learn: version bump.
9
10 Package-Manager: portage-2.3.3
11
12 sci-libs/scikits_learn/Manifest | 1 +
13 sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild | 117 +++++++++++++++++++++
14 2 files changed, 118 insertions(+)
15
16 diff --git a/sci-libs/scikits_learn/Manifest b/sci-libs/scikits_learn/Manifest
17 index 265606265a..8fc199b9b8 100644
18 --- a/sci-libs/scikits_learn/Manifest
19 +++ b/sci-libs/scikits_learn/Manifest
20 @@ -1,2 +1,3 @@
21 DIST scikit-learn-0.17.1.tar.gz 7898571 SHA256 9f4cf58e57d81783289fc503caaed1f210bab49b7a6f680bf3c04b1e0a96e5f0 SHA512 5786e04a13225d2433103f1873f2753e332704b98c4c32b840970f763ec1abf0248007089e5ae47e11c66535f05a0d0402715622e6d6f0955ec7961b92e1b2e5 WHIRLPOOL cded0be080aa0e6e5486d2613c007c7ff1ea769b623f60cb97c4e03b2d130c53b66e9c22a20d644c61cd82eb8b460024a2b84365ff846aacfc07bf49a6bef0ac
22 DIST scikit-learn-0.17.tar.gz 7834903 SHA256 23a5b6804524cb2cd54d8310010169511c7633dcf69af7439747eec02677f314 SHA512 53a76e2f90e27967bf216cd9d7e8051ed847a3381e3b7b7b8236511b4105eef41bd4d3c9f7f71a51db4b0bf99cbd571d7c1b26803757cff04424b70cb834b555 WHIRLPOOL 3a1ef13dafe6eb38389f68bc75dee10bfe141bac6d2782cd11be27ffcb8fe7efdf113b6911a238c6cd141bfe3b69960f47cf0725d0ea033129dff8fb5c57bef4
23 +DIST scikit-learn-0.18.1.tar.gz 8933930 SHA256 1eddfc27bb37597a5d514de1299981758e660e0af56981c0bfdf462c9568a60c SHA512 7149e683424351a28c19501302ece147cb03d4d12b08822eb2b1898a4978b96803323778fbba628008dd7a7c85daea4e9b550a71ee76851f9a09b2baac18a799 WHIRLPOOL c709586d3b8bdd938a81e97cfc5c77e31b7b0ef068c2d3f6ec922999a524d9ba0234ca42270724b2f6f3da98409b6d85b229aa241adbc02136b95bbb91c757b6
24
25 diff --git a/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild b/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
26 new file mode 100644
27 index 0000000000..75452bc99b
28 --- /dev/null
29 +++ b/sci-libs/scikits_learn/scikits_learn-0.18.1.ebuild
30 @@ -0,0 +1,117 @@
31 +# Copyright 1999-2017 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{4,5} )
38 +
39 +inherit distutils-r1 flag-o-matic
40 +
41 +MYPN="${PN/scikits_/scikit-}"
42 +MYP="${MYPN}-${PV}"
43 +
44 +DESCRIPTION="Python modules for machine learning and data mining"
45 +HOMEPAGE="http://scikit-learn.org"
46 +SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz"
47 +
48 +LICENSE="BSD"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
51 +IUSE="doc examples test"
52 +
53 +RDEPEND="
54 + dev-python/joblib[${PYTHON_USEDEP}]
55 + dev-python/matplotlib[${PYTHON_USEDEP}]
56 + dev-python/nose[${PYTHON_USEDEP}]
57 + >=dev-python/numpy-1.6.1[lapack,${PYTHON_USEDEP}]
58 + sci-libs/scikits[${PYTHON_USEDEP}]
59 + >=sci-libs/scipy-0.9[${PYTHON_USEDEP}]
60 + virtual/blas
61 + virtual/cblas
62 + virtual/python-funcsigs[${PYTHON_USEDEP}]
63 + "
64 +DEPEND="
65 + dev-python/cython[${PYTHON_USEDEP}]
66 + dev-python/numpy[lapack,${PYTHON_USEDEP}]
67 + dev-python/setuptools[${PYTHON_USEDEP}]
68 + sci-libs/scipy[${PYTHON_USEDEP}]
69 + virtual/blas
70 + virtual/cblas
71 + doc? (
72 + dev-python/joblib[${PYTHON_USEDEP}]
73 + dev-python/matplotlib[${PYTHON_USEDEP}]
74 + dev-python/sphinx[${PYTHON_USEDEP}]
75 + )"
76 +
77 +S="${WORKDIR}/${MYP}"
78 +
79 +python_prepare_all() {
80 + # bug #397605
81 + [[ ${CHOST} == *-darwin* ]] \
82 + && append-ldflags -bundle "-undefined dynamic_lookup" \
83 + || append-ldflags -shared
84 +
85 + # scikits-learn now uses the horrible numpy.distutils automagic
86 + export SCIPY_FCONFIG="config_fc --noopt --noarch"
87 +
88 + # use system joblib
89 + rm -r sklearn/externals/joblib/* || die
90 + echo "from joblib import *" > sklearn/externals/joblib/__init__.py
91 + sed -i -e '/joblib\/test/d' sklearn/externals/setup.py || die
92 + sed -i -e 's/..externals.joblib/ joblib/g' \
93 + sklearn/cross_validation.py \
94 + sklearn/decomposition/tests/test_sparse_pca.py \
95 + sklearn/metrics/pairwise.py || die
96 +
97 + rm sklearn/externals/funcsigs.py || die
98 + rm sklearn/externals/odict.py || die
99 + sed -e 's:from ..externals.funcsigs import signature:from funcsigs import signature:g' \
100 + -i sklearn/utils/fixes.py || die
101 + sed -e 's:from sklearn.externals.funcsigs import signature:from funcsigs import signature:g' \
102 + -i sklearn/gaussian_process/{tests/test_,}kernels.py || die
103 +
104 + distutils-r1_python_prepare_all
105 +}
106 +
107 +python_compile() {
108 + distutils-r1_python_compile ${SCIPY_FCONFIG}
109 +}
110 +
111 +python_compile_all() {
112 + if use doc; then
113 + cd "${S}/doc" || die
114 + local d="${BUILD_DIR}"/lib
115 + ln -s "${S}"/sklearn/datasets/{data,descr,images} \
116 + "${d}"/sklearn/datasets || die
117 + VARTEXFONTS="${T}"/fonts \
118 + MPLCONFIGDIR="${BUILD_DIR}" \
119 + PYTHONPATH="${d}" \
120 + emake html
121 + rm -r "${d}"/sklearn/datasets/{data,descr,images} || die
122 + fi
123 +}
124 +
125 +python_test() {
126 + # doc builds and runs tests
127 + use doc && return
128 + distutils_install_for_testing ${SCIPY_FCONFIG}
129 + esetup.py \
130 + install --root="${T}/test-${EPYTHON}" \
131 + --no-compile ${SCIPY_FCONFIG}
132 + pushd "${T}/test-${EPYTHON}/$(python_get_sitedir)" || die > /dev/null
133 + nosetests -v sklearn --exe || die
134 + popd > /dev/null
135 +}
136 +
137 +python_install() {
138 + distutils-r1_python_install ${SCIPY_FCONFIG}
139 +}
140 +
141 +python_install_all() {
142 + find "${S}" -name \*LICENSE.txt -delete
143 + insinto /usr/share/doc/${PF}
144 + use doc && doins -r doc/_build/html
145 + use examples && doins -r examples
146 + distutils-r1_python_install_all
147 +}