summaryrefslogtreecommitdiff
path: root/sci-libs/scikit-learn
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
commite748ba9741f6540f4675c23e3e37b73e822c13a4 (patch)
tree23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /sci-libs/scikit-learn
parent908778078736bd36f7a60a2d576d415cb8e000fa (diff)
gentoo resync : 31.05.2021
Diffstat (limited to 'sci-libs/scikit-learn')
-rw-r--r--sci-libs/scikit-learn/Manifest5
-rw-r--r--sci-libs/scikit-learn/files/scikit-learn-0.24.2-no-O3.patch55
-rw-r--r--sci-libs/scikit-learn/scikit-learn-0.23.2.ebuild66
-rw-r--r--sci-libs/scikit-learn/scikit-learn-0.24.2.ebuild68
4 files changed, 126 insertions, 68 deletions
diff --git a/sci-libs/scikit-learn/Manifest b/sci-libs/scikit-learn/Manifest
index 3b9a9d0e7e35..ab48a5117475 100644
--- a/sci-libs/scikit-learn/Manifest
+++ b/sci-libs/scikit-learn/Manifest
@@ -1,5 +1,6 @@
+AUX scikit-learn-0.24.2-no-O3.patch 2346 BLAKE2B b4186a3e6a242ac964f4970adf227d2c6512141faf89828df60626aef73ab3d3de9fdeaf5fd31e230d196293b45feb11ff599a31b882ef86e1e563ff9209d7e6 SHA512 a6f2b74c424a000675ad838d95c71e459ca392f600875839cc5a740249a5db08e3d7968f87ae587398259d8dbf5ece91fe114f7c59581a32a03f3e9d183f81e8
DIST scikit-learn-0.22.2_p1.tar.gz 7034850 BLAKE2B 41c362ef6594e837a9fc798837e666fbb51e33954fdf700292650204fd9d1ab4fc4d1695890d02a24ad68f4dcc2d3cde8f0827eca70c6fb9a6f0e5c0d9c04fd5 SHA512 20bcda5c65f76bce9b71c5b5fb1b499f7f3a7a3f6fa5fade80a38dc658cb434e16e9d5a4906a9657157a5cc90a6d51080575d6e510207baa9f8b06c4fa761d5b
-DIST scikit-learn-0.23.2.tar.gz 7190564 BLAKE2B db90e3d05d9b563c6cd98a6820c27b541e757e3fb6c25262b720842811b9e26d41a4a9c1d73e675714573d84dab799a0c450e768f4a41a39a6a61f6930c4c79a SHA512 e9797185b1b9def3ee5525e9b72742784aeb78fe8b069bb5aeab1d0f4513cf738c4489ed894274606dea9d6a32ccd3df26170ce1951e443dc77f9287c372e8c5
+DIST scikit-learn-0.24.2.tar.gz 7589697 BLAKE2B a5a32db690e76d6ecfcb12d57a7f84ebcc7e67ecb73258c1d923f9b98a9d87c46aac96918ef7c3d8741f5dbeb46f169c73a7744fb7b92e6ab5cf42101a6bc2f1 SHA512 2159baf63414b9594918b40e1b72af2ab47349335ad4e3afd9756921f786737ed41d6deb333881e8c5c6e1f7ce9cfa10691b966dc2476c48c051621f9049d2ee
EBUILD scikit-learn-0.22.2_p1-r1.ebuild 1636 BLAKE2B c0a9c93eff797279d36a47d6990b76dd290c6b170c982a7179557043d0a7f84b8eea598c925166ded61ab4acc8ea2d5ec2ddf61d0549b51170e7626521694d3c SHA512 08f222a4c3d0e250e6a2ddd73fb1073898812c29f3728618ca1a33b9c559a69bd84e2d949df8bd15b8066909677292e0ee2c13815efbd8fe33a06a8ebe8c0c02
-EBUILD scikit-learn-0.23.2.ebuild 1508 BLAKE2B 46a4295f6e5fb78b5687744d78ae790447879a655e090a76c395ad43f0f4eae44be9b036559b4e429b52f1d8a6e8f384a7662d25aff0690f8fbea19be5387b20 SHA512 7dc7e7a4237a899a1515e49ec065ce3295dd35aacf936842023fe6a4e00c2e7c14b3653cb601bd25fc7e783e31258e030ca70396912f7b9c580a55a725910885
+EBUILD scikit-learn-0.24.2.ebuild 1807 BLAKE2B d3208c01ce56f170091968c3c7c5b9a017b895135d349691f04d26a590d3525cbb0b979cdaefa263dc8c0648a4421c5f18c532f6425eaf5188ddd3f55b386940 SHA512 6e2758fe1dc095f5f23ef85d748839563015884512391ba6127b9ac50e9c5bd37b73dde9924af91dd369fe1719f6d5cd0162e12a8f0a09753ff51f919cb333af
MISC metadata.xml 736 BLAKE2B eb5c07231e185d9f9bd985209815f8515abf6bcff68e38563524542c8f591c1625711238b0d1b028776c8d658c32df3de4052a9dc88627a009eef5b8a7e68b5a SHA512 ee09304bdd96093bac49584a10b71650a3c764c28f03b851e197c31f8bbb6529b40433ad70f8100f33901b5b7fac8d349aad83ea10ad4770e16574484223af56
diff --git a/sci-libs/scikit-learn/files/scikit-learn-0.24.2-no-O3.patch b/sci-libs/scikit-learn/files/scikit-learn-0.24.2-no-O3.patch
new file mode 100644
index 000000000000..58caf95a9cf1
--- /dev/null
+++ b/sci-libs/scikit-learn/files/scikit-learn-0.24.2-no-O3.patch
@@ -0,0 +1,55 @@
+diff --git a/sklearn/manifold/setup.py b/sklearn/manifold/setup.py
+index 0db2d5d..fb4fc38 100644
+--- a/sklearn/manifold/setup.py
++++ b/sklearn/manifold/setup.py
+@@ -15,14 +15,14 @@ def configuration(parent_package="", top_path=None):
+ config.add_extension("_utils",
+ sources=["_utils.pyx"],
+ include_dirs=[numpy.get_include()],
+- libraries=libraries,
+- extra_compile_args=["-O3"])
++ libraries=libraries)
++
+
+ config.add_extension("_barnes_hut_tsne",
+ sources=["_barnes_hut_tsne.pyx"],
+ include_dirs=[numpy.get_include()],
+- libraries=libraries,
+- extra_compile_args=['-O3'])
++ libraries=libraries)
++
+
+ config.add_subpackage('tests')
+
+diff --git a/sklearn/tree/setup.py b/sklearn/tree/setup.py
+index 079ae9d..b38ee4b 100644
+--- a/sklearn/tree/setup.py
++++ b/sklearn/tree/setup.py
+@@ -12,23 +12,19 @@ def configuration(parent_package="", top_path=None):
+ config.add_extension("_tree",
+ sources=["_tree.pyx"],
+ include_dirs=[numpy.get_include()],
+- libraries=libraries,
+- extra_compile_args=["-O3"])
++ libraries=libraries)
+ config.add_extension("_splitter",
+ sources=["_splitter.pyx"],
+ include_dirs=[numpy.get_include()],
+- libraries=libraries,
+- extra_compile_args=["-O3"])
++ libraries=libraries)
+ config.add_extension("_criterion",
+ sources=["_criterion.pyx"],
+ include_dirs=[numpy.get_include()],
+- libraries=libraries,
+- extra_compile_args=["-O3"])
++ libraries=libraries)
+ config.add_extension("_utils",
+ sources=["_utils.pyx"],
+ include_dirs=[numpy.get_include()],
+- libraries=libraries,
+- extra_compile_args=["-O3"])
++ libraries=libraries)
+
+ config.add_subpackage("tests")
+
diff --git a/sci-libs/scikit-learn/scikit-learn-0.23.2.ebuild b/sci-libs/scikit-learn/scikit-learn-0.23.2.ebuild
deleted file mode 100644
index 4d66f60873c2..000000000000
--- a/sci-libs/scikit-learn/scikit-learn-0.23.2.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-DISTUTILS_USE_SETUPTOOLS=no
-inherit distutils-r1
-
-DESCRIPTION="Machine learning library for Python"
-HOMEPAGE="https://scikit-learn.org/stable/"
-SRC_URI="https://github.com/scikit-learn/scikit-learn/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-IUSE="examples"
-
-DEPEND="
- virtual/blas:=
- virtual/cblas:=
-"
-RDEPEND="
- ${DEPEND}
- dev-python/wheel[${PYTHON_USEDEP}]
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/joblib[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- dev-python/threadpoolctl[${PYTHON_USEDEP}]
-"
-
-distutils_enable_tests pytest
-
-python_prepare_all() {
- # scikits-learn now uses the horrible numpy.distutils automagic
- export SCIPY_FCONFIG="config_fc --noopt --noarch"
-
- # remove bundled cblas
- rm -rf sklearn/src || die "failed to remove bundled cblas"
-
- distutils-r1_python_prepare_all
-}
-
-python_compile() {
- distutils-r1_python_compile ${SCIPY_FCONFIG}
-}
-
-python_test() {
- distutils_install_for_testing ${SCIPY_FCONFIG}
- pushd "${TEST_DIR}/lib" >/dev/null || die
- pytest -vv || die "testing failed with ${EPYTHON}"
- popd >/dev/null || die
-}
-
-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
- fi
-}
diff --git a/sci-libs/scikit-learn/scikit-learn-0.24.2.ebuild b/sci-libs/scikit-learn/scikit-learn-0.24.2.ebuild
new file mode 100644
index 000000000000..7fe7e3be3a4f
--- /dev/null
+++ b/sci-libs/scikit-learn/scikit-learn-0.24.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+DISTUTILS_IN_SOURCE_BUILD=1
+inherit distutils-r1
+
+DESCRIPTION="Machine learning library for Python"
+HOMEPAGE="https://scikit-learn.org/stable/"
+SRC_URI="https://github.com/scikit-learn/scikit-learn/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="examples"
+
+DEPEND="
+ virtual/blas:=
+ virtual/cblas:=
+"
+RDEPEND="
+ ${DEPEND}
+ dev-python/wheel[${PYTHON_USEDEP}]
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/joblib[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ dev-python/threadpoolctl[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+# For some reason this wants to use urllib to fetch things from the internet
+# distutils_enable_sphinx doc \
+# dev-python/matplotlib \
+# dev-python/memory_profiler \
+# dev-python/numpydoc \
+# dev-python/pandas \
+# dev-python/pillow \
+# dev-python/seaborn \
+# dev-python/sphinx-gallery \
+# dev-python/sphinx-prompt \
+# sci-libs/scikit-image
+
+PATCHES=( "${FILESDIR}"/${P}-no-O3.patch )
+
+python_test() {
+ distutils_install_for_testing
+ # manually run tests as they need some weird thingies
+ # skip tests which need data files that are not installed
+ local tfile
+ for tfile in sklearn/tests/test_*.py ; do
+ if [[ "${tfile}" =~ "test_multiclass.py" ||
+ "${tfile}" =~ "test_multioutput.py" ||
+ "${tfile}" =~ "test_pipeline.py" ]]; then
+ continue
+ fi
+ einfo "Testing: ${tfile}"
+ ${EPYTHON} "${tfile}" || die "tests failed for ${tfile} with ${EPYTHON}"
+ done
+}
+
+python_install_all() {
+ find "${S}" -name \*LICENSE.txt -delete || die
+ distutils-r1_python_install_all
+ use examples && dodoc -r examples
+}