* [gentoo-commits] repo/gentoo:master commit in: sci-libs/scikit-image/files/, sci-libs/scikit-image/
@ 2024-01-26 20:15 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2024-01-26 20:15 UTC (permalink / raw
To: gentoo-commits
commit: f4b1c112f07f00fe0cc0094c4cd32fd38c694cfd
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 26 19:31:50 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 26 20:15:53 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4b1c112
sci-libs/scikit-image: Remove dev-python/numpydoc test dep
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/scikit-image-0.22.0-no-numpydoc.patch | 42 ++++++++++++++++++++++
sci-libs/scikit-image/scikit-image-0.22.0.ebuild | 8 +++--
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/sci-libs/scikit-image/files/scikit-image-0.22.0-no-numpydoc.patch b/sci-libs/scikit-image/files/scikit-image-0.22.0-no-numpydoc.patch
new file mode 100644
index 000000000000..25137b5167c8
--- /dev/null
+++ b/sci-libs/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/sci-libs/scikit-image/scikit-image-0.22.0.ebuild b/sci-libs/scikit-image/scikit-image-0.22.0.ebuild
index 66957c5ed7ae..010406c37256 100644
--- a/sci-libs/scikit-image/scikit-image-0.22.0.ebuild
+++ b/sci-libs/scikit-image/scikit-image-0.22.0.ebuild
@@ -35,9 +35,6 @@ DEPEND="${RDEPEND}"
BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
- test? (
- dev-python/numpydoc[${PYTHON_USEDEP}]
- )
"
DOCS=( CONTRIBUTORS.txt RELEASE.txt )
@@ -46,6 +43,11 @@ 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-26 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26 20:15 [gentoo-commits] repo/gentoo:master commit in: sci-libs/scikit-image/files/, sci-libs/scikit-image/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox