public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scikits_learn/
Date: Thu,  3 Aug 2017 17:33:24 +0000 (UTC)	[thread overview]
Message-ID: <1501781584.bac12eae1c20a7fcc573094385b4315c7622a57c.bicatali@gentoo> (raw)

commit:     bac12eae1c20a7fcc573094385b4315c7622a57c
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 18:14:55 2017 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Aug  3 17:33:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bac12eae

sci-libs/scikits_learn: keep funcsigs and joblib bundled to avoid hair pulling

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 .../scikits_learn/scikits_learn-0.18.2-r1.ebuild   | 123 +++++++++++++++++++++
 1 file changed, 123 insertions(+)

diff --git a/sci-libs/scikits_learn/scikits_learn-0.18.2-r1.ebuild b/sci-libs/scikits_learn/scikits_learn-0.18.2-r1.ebuild
new file mode 100644
index 00000000000..339670ff4d3
--- /dev/null
+++ b/sci-libs/scikits_learn/scikits_learn-0.18.2-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1 flag-o-matic
+
+MYPN="${PN/scikits_/scikit-}"
+MYP="${MYPN}-${PV}"
+
+DESCRIPTION="Python modules for machine learning and data mining"
+HOMEPAGE="http://scikit-learn.org"
+SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples test"
+
+# tried to unbundle virtual/python-funcsigs, funcsigs, odict
+# but it is a large mess to maintain
+
+RDEPEND="
+	dev-python/matplotlib[${PYTHON_USEDEP}]
+	dev-python/nose[${PYTHON_USEDEP}]
+	dev-python/numpy[lapack,${PYTHON_USEDEP}]
+	sci-libs/scikits[${PYTHON_USEDEP}]
+	sci-libs/scipy[${PYTHON_USEDEP}]
+	virtual/blas:=
+	virtual/cblas:=
+"
+
+DEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/numpy[lapack,${PYTHON_USEDEP}]
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	sci-libs/scipy[${PYTHON_USEDEP}]
+	virtual/blas:=
+	virtual/cblas:=
+	doc? (
+		dev-python/matplotlib[${PYTHON_USEDEP}]
+		dev-python/sphinx[${PYTHON_USEDEP}]
+	)
+"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=( "${FILESDIR}/${PN}-0.18.1-system-cblas.patch" )
+
+python_prepare_all() {
+	# bug #397605
+	[[ ${CHOST} == *-darwin* ]] \
+		&& append-ldflags -bundle "-undefined dynamic_lookup" \
+		|| append-ldflags -shared
+
+	# scikits-learn now uses the horrible numpy.distutils automagic
+	export SCIPY_FCONFIG="config_fc --noopt --noarch"
+
+	# remove bundled cblas
+	rm -r sklearn/src || die
+
+	# commented out, since it is a mess to maintain
+	# use system joblib
+	#rm -r sklearn/externals/joblib || die
+	#sed -i -e '/joblib/d' sklearn/externals/setup.py || die
+	#for f in sklearn/{*/,}*.py; do
+	#	sed -r -e '/^from/s/(sklearn|\.|)\.externals\.joblib/joblib/' \
+	#		-e 's/from (sklearn|\.|)\.externals import/import/' -i $f || die
+	#done
+
+	# use system funcsigs and odict
+	#rm sklearn/externals/funcsigs.py || die
+	#rm sklearn/externals/odict.py || die
+	#for f in sklearn/{utils/fixes.py,gaussian_process/{tests/test_,}kernels.py}; do
+	#	sed -r -e 's/from (sklearn|\.|)\.externals\.funcsigs/from funcsigs/' -i $f || die
+	#done
+	distutils-r1_python_prepare_all
+}
+
+python_compile() {
+	distutils-r1_python_compile ${SCIPY_FCONFIG}
+}
+
+python_compile_all() {
+	if use doc; then
+		cd "${S}/doc" || die
+		local d="${BUILD_DIR}/lib"
+		ln -s \
+		   "${S}"/sklearn/datasets/{data,descr,images} \
+		   "${d}"/sklearn/datasets || die
+		VARTEXFONTS="${T}"/fonts \
+			MPLCONFIGDIR="${BUILD_DIR}" \
+			PYTHONPATH="${d}" \
+			emake html
+		rm -r "${d}"/sklearn/datasets/{data,descr,images} || die
+	fi
+}
+
+python_test() {
+	# doc builds and runs tests
+	use doc && return
+	distutils_install_for_testing ${SCIPY_FCONFIG}
+	esetup.py install \
+			  --root="${T}/test-${EPYTHON}" \
+			  --no-compile ${SCIPY_FCONFIG}
+	pushd "${T}/test-${EPYTHON}/$(python_get_sitedir)" || die > /dev/null
+	JOBLIB_MULTIPROCESSING=2 SKLEARN_SKIP_NETWORK_TESTS=1 nosetests -v sklearn --exe || die
+	popd > /dev/null
+}
+
+python_install() {
+	distutils-r1_python_install ${SCIPY_FCONFIG}
+}
+
+python_install_all() {
+	find "${S}" -name \*LICENSE.txt -delete
+	insinto /usr/share/doc/${PF}
+	use doc && doins -r doc/_build/html
+	use examples && doins -r examples
+	distutils-r1_python_install_all
+}


             reply	other threads:[~2017-08-03 17:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 17:33 Sebastien Fabbro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-13  1:14 [gentoo-commits] repo/gentoo:master commit in: sci-libs/scikits_learn/ Sam James
2020-06-01  6:41 Georgy Yakovlev
2020-05-09 11:24 Mikle Kolyada
2020-05-09 11:24 Mikle Kolyada
2020-04-08  6:56 Patrick McLean
2020-04-03  3:30 Patrick McLean
2020-01-28  8:24 Joonas Niilola
2020-01-16  7:03 Michał Górny
2020-01-16  7:03 Michał Górny
2019-08-03 20:36 Alexey Shvetsov
2019-02-27  4:25 Aaron Bauman
2017-08-16 18:12 Sebastien Fabbro
2017-06-28  4:02 Sebastien Fabbro
2017-02-14 11:33 Benda XU
2017-02-14  6:47 Benda XU
2017-02-14  6:47 Benda XU
2016-08-13 18:48 David Seifert
2016-01-26 19:09 Justin Lecher
2016-01-26 19:09 Justin Lecher
2016-01-06 15:07 Justin Lecher
2016-01-06 15:07 Justin Lecher
2016-01-06 15:07 Justin Lecher
2015-11-06 16:22 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501781584.bac12eae1c20a7fcc573094385b4315c7622a57c.bicatali@gentoo \
    --to=bicatali@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox