commit:     e36e1cdb2a34e5a50ece846937d0d6986161099c
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 17 02:26:15 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Thu Dec 18 01:30:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e36e1cdb

dev-python/matplotlib: force latex dependencies as test deps too

This USE="latex" is essentially IUSE_RUNTIME, installing the packages at
any time suffices to make latex work.

The tests also test this support, and cannot effectively skip them when
texlive-core is installed but the specific used packages aren't. Result:
nasty inexplicable test failures.

Simplify testing dramatically by forcing latex tests to run and do so
correctly.

Closes: https://bugs.gentoo.org/786600
Acked-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 dev-python/matplotlib/matplotlib-3.10.7.ebuild | 21 +++++++++++++--------
 dev-python/matplotlib/matplotlib-3.10.8.ebuild | 21 +++++++++++++--------
 2 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/dev-python/matplotlib/matplotlib-3.10.7.ebuild 
b/dev-python/matplotlib/matplotlib-3.10.7.ebuild
index de3f0e7ed39c..bf4a95d9121a 100644
--- a/dev-python/matplotlib/matplotlib-3.10.7.ebuild
+++ b/dev-python/matplotlib/matplotlib-3.10.7.ebuild
@@ -33,6 +33,17 @@ SLOT="0"
 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ppc ~ppc64 ~riscv ~s390 ~sparc 
~x86 ~arm64-macos ~x64-macos"
 IUSE="cairo excel gtk3 latex qt6 tk webagg wxwidgets"
 
+LATEX_DEPEND="
+       virtual/latex-base
+       app-text/dvipng
+       app-text/ghostscript-gpl
+       app-text/poppler[utils]
+       dev-texlive/texlive-fontsrecommended
+       dev-texlive/texlive-latexextra
+       dev-texlive/texlive-luatex
+       dev-texlive/texlive-xetex
+"
+
 DEPEND="
        media-libs/freetype:2
        >=media-libs/qhull-2013:=
@@ -66,14 +77,7 @@ RDEPEND="
                x11-libs/gtk+:3[introspection]
        )
        latex? (
-               virtual/latex-base
-               app-text/dvipng
-               app-text/ghostscript-gpl
-               app-text/poppler[utils]
-               dev-texlive/texlive-fontsrecommended
-               dev-texlive/texlive-latexextra
-               dev-texlive/texlive-luatex
-               dev-texlive/texlive-xetex
+               ${LATEX_DEPEND}
        )
        qt6? (
                $(python_gen_cond_dep '
@@ -100,6 +104,7 @@ BDEPEND="
        virtual/pkgconfig
        test? (
                $(python_gen_impl_dep 'tk')
+               ${LATEX_DEPEND}
                dev-python/psutil[${PYTHON_USEDEP}]
                dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
                >=dev-python/tornado-6.0.4[${PYTHON_USEDEP}]

diff --git a/dev-python/matplotlib/matplotlib-3.10.8.ebuild 
b/dev-python/matplotlib/matplotlib-3.10.8.ebuild
index aa410025025e..449303c780db 100644
--- a/dev-python/matplotlib/matplotlib-3.10.8.ebuild
+++ b/dev-python/matplotlib/matplotlib-3.10.8.ebuild
@@ -33,6 +33,17 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 
~sparc ~x86 ~arm64-macos ~x64-macos"
 IUSE="cairo excel gtk3 latex qt6 tk webagg wxwidgets"
 
+LATEX_DEPEND="
+       virtual/latex-base
+       app-text/dvipng
+       app-text/ghostscript-gpl
+       app-text/poppler[utils]
+       dev-texlive/texlive-fontsrecommended
+       dev-texlive/texlive-latexextra
+       dev-texlive/texlive-luatex
+       dev-texlive/texlive-xetex
+"
+
 DEPEND="
        media-libs/freetype:2
        >=media-libs/qhull-2013:=
@@ -66,14 +77,7 @@ RDEPEND="
                x11-libs/gtk+:3[introspection]
        )
        latex? (
-               virtual/latex-base
-               app-text/dvipng
-               app-text/ghostscript-gpl
-               app-text/poppler[utils]
-               dev-texlive/texlive-fontsrecommended
-               dev-texlive/texlive-latexextra
-               dev-texlive/texlive-luatex
-               dev-texlive/texlive-xetex
+               ${LATEX_DEPEND}
        )
        qt6? (
                $(python_gen_cond_dep '
@@ -100,6 +104,7 @@ BDEPEND="
        virtual/pkgconfig
        test? (
                $(python_gen_impl_dep 'tk')
+               ${LATEX_DEPEND}
                dev-python/psutil[${PYTHON_USEDEP}]
                dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
                >=dev-python/tornado-6.0.4[${PYTHON_USEDEP}]

Reply via email to