summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-01-26 21:15:03 +0100
committerMichał Górny <mgorny@gentoo.org>2024-01-26 21:15:54 +0100
commitdc3ca712259787a759fe050e49f0c84ca914d4b2 (patch)
tree54f2be82c3b38d8066aa7020d91bd15fd26d1543 /dev-python/scikit-image
parentsci-libs/scikit-image: Enable py3.12 (diff)
downloadgentoo-dc3ca712259787a759fe050e49f0c84ca914d4b2.tar.gz
gentoo-dc3ca712259787a759fe050e49f0c84ca914d4b2.tar.bz2
gentoo-dc3ca712259787a759fe050e49f0c84ca914d4b2.zip
Move {sci-libs → dev-python}/scikit-image
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/scikit-image')
-rw-r--r--dev-python/scikit-image/Manifest2
-rw-r--r--dev-python/scikit-image/files/scikit-image-0.22.0-no-numpydoc.patch42
-rw-r--r--dev-python/scikit-image/metadata.xml18
-rw-r--r--dev-python/scikit-image/scikit-image-0.19.3-r1.ebuild59
-rw-r--r--dev-python/scikit-image/scikit-image-0.22.0.ebuild64
5 files changed, 185 insertions, 0 deletions
diff --git a/dev-python/scikit-image/Manifest b/dev-python/scikit-image/Manifest
new file mode 100644
index 000000000000..8b42da1c8888
--- /dev/null
+++ b/dev-python/scikit-image/Manifest
@@ -0,0 +1,2 @@
+DIST scikit-image-0.19.3.tar.gz 22232287 BLAKE2B 855584be0e69ac6e0dc7a17a68a1bca6843b471073e63d098b4933bc301eab5246d4cd2b444960de7fcd37012b66f7ba8cd6030ac485a7ab3aa1d36501aef0c7 SHA512 cda1699200e19155da13e313eb129771b7bb895913e552b959a3374267fe4f73c33d5e6e2fa2d49326903c901925797e46b9f05342a78c5332df1c266d37471a
+DIST scikit_image-0.22.0.tar.gz 22685018 BLAKE2B 7d0a65f75f5a58211e21501d6cc6a638f1d36e9a2198a3ad9ff2f230890496c41d5e6cdaed02bbaa62f26aa57fd24fc993656cbdfc2c9c9750147d0f325e56f1 SHA512 4b8c097cd5465f57b1c0879363fe3bdc0941decf2d1f8a881f13f2b7f3207c425f3a0cdcb4be0eed7b33d3ac2f3f8b1835d1cfa69cd3fa2ff5e0be11385fef48
diff --git a/dev-python/scikit-image/files/scikit-image-0.22.0-no-numpydoc.patch b/dev-python/scikit-image/files/scikit-image-0.22.0-no-numpydoc.patch
new file mode 100644
index 000000000000..25137b5167c8
--- /dev/null
+++ b/dev-python/scikit-image/files/scikit-image-0.22.0-no-numpydoc.patch
@@ -0,0 +1,42 @@
+From 9b27f8e802c9513952c8a42450a4459fa357b89c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 26 Jan 2024 20:25:16 +0100
+Subject: [PATCH] Make it possible to run tests without numpydoc
+
+Skip the three tests requiring numpydoc when it is not installed.
+For `skimage/_shared/tests/test_utils.py`, use the existing
+`have_numpydoc` constant.
+For `skimage/measure/tests/test_regionprops.py`, use the standard
+`pytest.importorskip()` function.
+
+This makes it possible to successfully run the test suite when
+`numpydoc` is not installed. This would be convenient for Gentoo
+since numpydoc is facing neverending test regressions (in its own test
+suite).
+---
+ skimage/measure/tests/test_regionprops.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/skimage/measure/tests/test_regionprops.py b/skimage/measure/tests/test_regionprops.py
+index 01a59dfbf..0b74d30a4 100644
+--- a/skimage/measure/tests/test_regionprops.py
++++ b/skimage/measure/tests/test_regionprops.py
+@@ -4,7 +4,6 @@ import re
+ import numpy as np
+ import pytest
+ import scipy.ndimage as ndi
+-import numpydoc
+ from numpy.testing import (assert_allclose, assert_almost_equal,
+ assert_array_almost_equal, assert_array_equal,
+ assert_equal)
+@@ -1261,6 +1260,7 @@ def test_column_dtypes_correct():
+
+
+ def test_all_documented_items_in_col_dtypes():
++ numpydoc = pytest.importorskip("numpydoc")
+ docstring = numpydoc.docscrape.FunctionDoc(regionprops)
+ notes_lines = docstring['Notes']
+ property_lines = filter(lambda line: line.startswith('**'), notes_lines)
+--
+2.43.0
+
diff --git a/dev-python/scikit-image/metadata.xml b/dev-python/scikit-image/metadata.xml
new file mode 100644
index 000000000000..132691d57cb8
--- /dev/null
+++ b/dev-python/scikit-image/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ This SciKit (toolkit for SciPy) includes useful image processing
+ algorithms for use with Python and NumPy. While SciPy’s ndimage
+ provides low-level manipulation, scikits.image centres around
+ algorithms and applications.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">scikit-image</remote-id>
+ <remote-id type="github">scikit-image/scikit-image</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/scikit-image/scikit-image-0.19.3-r1.ebuild b/dev-python/scikit-image/scikit-image-0.19.3-r1.ebuild
new file mode 100644
index 000000000000..3b0060a33375
--- /dev/null
+++ b/dev-python/scikit-image/scikit-image-0.19.3-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Image processing routines for SciPy"
+HOMEPAGE="
+ https://scikit-image.org/
+ https://github.com/scikit-image/scikit-image/
+ https://pypi.org/project/scikit-image/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+RESTRICT="test"
+
+RDEPEND="
+ dev-python/imageio[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/networkx[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pywavelets[${PYTHON_USEDEP}]
+ dev-python/scipy[sparse(+),${PYTHON_USEDEP}]
+ dev-python/tifffile[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+"
+
+DOCS=( CONTRIBUTORS.txt RELEASE.txt )
+
+distutils_enable_tests pytest
+# There is a programmable error in your configuration file:
+#distutils_enable_sphinx doc/source dev-python/numpydoc dev-python/myst-parser
+
+python_test() {
+ # This needs to be run in the install dir
+ cd "${WORKDIR}/${P}-${EPYTHON//./_}/install/usr/lib/${EPYTHON}/site-packages/skimage" || die
+ distutils-r1_python_test
+}
+
+pkg_postinst() {
+ optfeature "FITS io capability" dev-python/astropy
+ optfeature "GTK" dev-python/pygtk
+ optfeature "Parallel computation" dev-python/dask
+ optfeature "io plugin providing most standard formats" dev-python/imread
+ # not in portage yet
+ #optfeature "io plugin providing a wide variety of formats, including specialized formats using in medical imaging." dev-python/simpleitk
+}
diff --git a/dev-python/scikit-image/scikit-image-0.22.0.ebuild b/dev-python/scikit-image/scikit-image-0.22.0.ebuild
new file mode 100644
index 000000000000..c9fa7b6e7d77
--- /dev/null
+++ b/dev-python/scikit-image/scikit-image-0.22.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=meson-python
+DISTUTILS_EXT=1
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Image processing routines for SciPy"
+HOMEPAGE="
+ https://scikit-image.org/
+ https://github.com/scikit-image/scikit-image/
+ https://pypi.org/project/scikit-image/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+PROPERTIES="test_network"
+RESTRICT="test"
+
+RDEPEND="
+ >=dev-python/imageio-2.27[${PYTHON_USEDEP}]
+ >=dev-python/lazy_loader-0.3[${PYTHON_USEDEP}]
+ >=dev-python/networkx-2.8[${PYTHON_USEDEP}]
+ >=dev-python/numpy-1.22[${PYTHON_USEDEP}]
+ >=dev-python/pillow-9.0.1[${PYTHON_USEDEP}]
+ >=dev-python/scipy-1.8[sparse(+),${PYTHON_USEDEP}]
+ >=dev-python/tifffile-2022.8.12[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+"
+
+DOCS=( CONTRIBUTORS.txt RELEASE.txt )
+
+distutils_enable_tests pytest
+# There is a programmable error in your configuration file:
+#distutils_enable_sphinx doc/source dev-python/numpydoc dev-python/myst-parser
+
+PATCHES=(
+ # https://github.com/scikit-image/scikit-image/pull/7307
+ "${FILESDIR}/${P}-no-numpydoc.patch"
+)
+
+python_test() {
+ rm -rf skimage || die
+ epytest --pyargs skimage
+}
+
+pkg_postinst() {
+ optfeature "FITS io capability" dev-python/astropy
+ optfeature "GTK" dev-python/pygtk
+ optfeature "Parallel computation" dev-python/dask
+ optfeature "io plugin providing most standard formats" dev-python/imread
+ optfeature "plotting" dev-python/matplotlib
+ optfeature "wavelet transformations" dev-python/pywavelets
+ optfeature "io plugin providing a wide variety of formats, including specialized formats using in medical imaging." dev-python/simpleitk
+}