sci-libs/scikits_learn: new package ahead of gentoo main
Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Horea Christian <horea.christ@yandex.com>
This commit is contained in:
parent
d0152b3d56
commit
d791d3d0fa
8
sci-libs/scikits_learn/ChangeLog
Normal file
8
sci-libs/scikits_learn/ChangeLog
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
*scikits_learn-0.20.3 (16 Jun 2019)
|
||||||
|
|
||||||
|
16 Jun 2019; <chymera@gentoo.org>
|
||||||
|
+files/scikits_learn-0.14.1-system-cblas.patch,
|
||||||
|
+files/scikits_learn-0.17.1-system-cblas.patch,
|
||||||
|
+files/scikits_learn-0.18.1-system-cblas.patch, +metadata.xml,
|
||||||
|
+scikits_learn-0.20.3.ebuild:
|
||||||
|
sci-libs/scikits_learn: new package ahead of gentoo main
|
1
sci-libs/scikits_learn/Manifest
Normal file
1
sci-libs/scikits_learn/Manifest
Normal file
@ -0,0 +1 @@
|
|||||||
|
DIST scikit-learn-0.20.3.tar.gz 11818490 SHA256 c503802a81de18b8b4d40d069f5e363795ee44b1605f38bc104160ca3bfe2c41 SHA512 fedc697b123e53badd7d75e2e0fa0749d9270c8ba52906227fda98f08b61bb40db9e0d1ffe71b030c30b64e77d000e7ba72cd9530c9f88c988dfc090c6c2872a WHIRLPOOL c8275fb275e39a183091f7bbbf78a364e4f2c297420b603f1c4a154aba23ae241263fad9ef60060c4334ac1a22bdf8ddfe1bbc4a1709db1cc4940a1e356fb976
|
@ -0,0 +1,28 @@
|
|||||||
|
--- sklearn/setup.py.orig 2013-08-08 13:54:08.310879167 -0700
|
||||||
|
+++ sklearn/setup.py 2013-08-08 13:52:59.808456423 -0700
|
||||||
|
@@ -68,14 +68,6 @@
|
||||||
|
libraries=libraries,
|
||||||
|
)
|
||||||
|
|
||||||
|
- # 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', [])):
|
||||||
|
- config.add_library('cblas',
|
||||||
|
- sources=[join('src', 'cblas', '*.c')])
|
||||||
|
- warnings.warn(BlasNotFoundError.__doc__)
|
||||||
|
-
|
||||||
|
# the following packages depend on cblas, so they have to be build
|
||||||
|
# after the above.
|
||||||
|
config.add_subpackage('linear_model')
|
||||||
|
--- sklearn/_build_utils.py.orig 2013-08-08 14:01:35.994589269 -0700
|
||||||
|
+++ sklearn/_build_utils.py 2013-08-08 12:19:41.875967870 -0700
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
return False
|
||||||
|
|
||||||
|
blas_info = get_info('blas_opt', 0)
|
||||||
|
- if (not blas_info) or atlas_not_found(blas_info):
|
||||||
|
+ if (not blas_info):
|
||||||
|
cblas_libs = ['cblas']
|
||||||
|
blas_info.pop('libraries', None)
|
||||||
|
else:
|
@ -0,0 +1,30 @@
|
|||||||
|
diff -Nur scikit-learn-0.17.1.orig/sklearn/_build_utils.py scikit-learn-0.17.1/sklearn/_build_utils.py
|
||||||
|
--- scikit-learn-0.17.1.orig/sklearn/_build_utils.py 2016-03-09 00:27:54.756813784 +0000
|
||||||
|
+++ scikit-learn-0.17.1/sklearn/_build_utils.py 2016-03-09 00:30:09.605118512 +0000
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
return False
|
||||||
|
|
||||||
|
blas_info = get_info('blas_opt', 0)
|
||||||
|
- if (not blas_info) or atlas_not_found(blas_info):
|
||||||
|
+ if (not blas_info):
|
||||||
|
cblas_libs = ['cblas']
|
||||||
|
blas_info.pop('libraries', None)
|
||||||
|
else:
|
||||||
|
diff -Nur scikit-learn-0.17.1.orig/sklearn/setup.py scikit-learn-0.17.1/sklearn/setup.py
|
||||||
|
--- scikit-learn-0.17.1.orig/sklearn/setup.py 2016-03-09 00:27:54.806813156 +0000
|
||||||
|
+++ scikit-learn-0.17.1/sklearn/setup.py 2016-03-09 00:29:28.215638848 +0000
|
||||||
|
@@ -58,14 +58,6 @@
|
||||||
|
libraries=libraries,
|
||||||
|
)
|
||||||
|
|
||||||
|
- # 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', [])):
|
||||||
|
- config.add_library('cblas',
|
||||||
|
- sources=[join('src', 'cblas', '*.c')])
|
||||||
|
- warnings.warn(BlasNotFoundError.__doc__)
|
||||||
|
-
|
||||||
|
# the following packages depend on cblas, so they have to be build
|
||||||
|
# after the above.
|
||||||
|
config.add_subpackage('linear_model')
|
@ -0,0 +1,32 @@
|
|||||||
|
Index: scikit-learn-0.18.1/sklearn/_build_utils/__init__.py
|
||||||
|
===================================================================
|
||||||
|
--- scikit-learn-0.18.1.orig/sklearn/_build_utils/__init__.py
|
||||||
|
+++ scikit-learn-0.18.1/sklearn/_build_utils/__init__.py
|
||||||
|
@@ -31,7 +31,7 @@ def get_blas_info():
|
||||||
|
return False
|
||||||
|
|
||||||
|
blas_info = get_info('blas_opt', 0)
|
||||||
|
- if (not blas_info) or atlas_not_found(blas_info):
|
||||||
|
+ if (not blas_info):
|
||||||
|
cblas_libs = ['cblas']
|
||||||
|
blas_info.pop('libraries', None)
|
||||||
|
else:
|
||||||
|
Index: scikit-learn-0.18.1/sklearn/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- scikit-learn-0.18.1.orig/sklearn/setup.py
|
||||||
|
+++ scikit-learn-0.18.1/sklearn/setup.py
|
||||||
|
@@ -63,14 +63,6 @@ def configuration(parent_package='', top
|
||||||
|
libraries=libraries,
|
||||||
|
)
|
||||||
|
|
||||||
|
- # 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', [])):
|
||||||
|
- config.add_library('cblas',
|
||||||
|
- sources=[join('src', 'cblas', '*.c')])
|
||||||
|
- warnings.warn(BlasNotFoundError.__doc__)
|
||||||
|
-
|
||||||
|
# the following packages depend on cblas, so they have to be build
|
||||||
|
# after the above.
|
||||||
|
config.add_subpackage('linear_model')
|
17
sci-libs/scikits_learn/metadata.xml
Normal file
17
sci-libs/scikits_learn/metadata.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>sci@gentoo.org</email>
|
||||||
|
<name>Gentoo Science Project</name>
|
||||||
|
</maintainer>
|
||||||
|
<longdescription lang="en">
|
||||||
|
scikits.learn is a python library for machine learning. It aims to
|
||||||
|
implement classic machine learning algorithms while remaining simple
|
||||||
|
and efficient.
|
||||||
|
</longdescription>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="pypi">scikit-learn</remote-id>
|
||||||
|
<remote-id type="sourceforge">scikit-learn</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
106
sci-libs/scikits_learn/scikits_learn-0.20.3.ebuild
Normal file
106
sci-libs/scikits_learn/scikits_learn-0.20.3.ebuild
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
# Copyright 1999-2019 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python2_7 python3_{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="https://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="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:=
|
||||||
|
"
|
||||||
|
|
||||||
|
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_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
|
||||||
|
distutils-r1_python_install_all
|
||||||
|
if use examples; then
|
||||||
|
dodoc -r examples
|
||||||
|
docompress -x /usr/share/doc/${PF}/examples
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user