commit:     01500ab07fd2a2d423ce457691bf9c570ef465b9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 05:53:37 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 16 05:55:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01500ab0

dev-python/matplotlib: conditionalise gtk+, pygobject test deps

The test suite skips correctly if gtk+ is disabled and works fine if pygobject
isn't installed as well.

The only snag is that libblockdev installs a Python module (gi.*) where gi 
(pygobject)
itself may not be installed, so that's fixed in 
87fe7688480db245fa772b2f750259ea6213c266.

Previously, that was confusing mpl's 'import gi' check.

See also: https://github.com/gentoo/gentoo/pull/32331
Bug: https://bugs.gentoo.org/807637
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/matplotlib/matplotlib-3.7.1.ebuild | 6 ++++--
 dev-python/matplotlib/matplotlib-3.7.2.ebuild | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dev-python/matplotlib/matplotlib-3.7.1.ebuild 
b/dev-python/matplotlib/matplotlib-3.7.1.ebuild
index d0f4addd4224..1b925186597a 100644
--- a/dev-python/matplotlib/matplotlib-3.7.1.ebuild
+++ b/dev-python/matplotlib/matplotlib-3.7.1.ebuild
@@ -111,9 +111,11 @@ BDEPEND="
                dev-python/mock[${PYTHON_USEDEP}]
                dev-python/psutil[${PYTHON_USEDEP}]
                dev-python/pytest-xdist[${PYTHON_USEDEP}]
-               >=dev-python/pygobject-3.40.1-r1:3[cairo?,${PYTHON_USEDEP}]
                >=dev-python/tornado-6.0.4[${PYTHON_USEDEP}]
-               x11-libs/gtk+:3[introspection]
+               gtk3? (
+                       
>=dev-python/pygobject-3.40.1-r1:3[cairo?,${PYTHON_USEDEP}]
+                       x11-libs/gtk+:3[introspection]
+               )
        )
 "
 

diff --git a/dev-python/matplotlib/matplotlib-3.7.2.ebuild 
b/dev-python/matplotlib/matplotlib-3.7.2.ebuild
index acdd8ed32ffc..0590c8818ea7 100644
--- a/dev-python/matplotlib/matplotlib-3.7.2.ebuild
+++ b/dev-python/matplotlib/matplotlib-3.7.2.ebuild
@@ -114,9 +114,11 @@ BDEPEND="
                dev-python/mock[${PYTHON_USEDEP}]
                dev-python/psutil[${PYTHON_USEDEP}]
                dev-python/pytest-xdist[${PYTHON_USEDEP}]
-               >=dev-python/pygobject-3.40.1-r1:3[cairo?,${PYTHON_USEDEP}]
                >=dev-python/tornado-6.0.4[${PYTHON_USEDEP}]
-               x11-libs/gtk+:3[introspection]
+               gtk3? (
+                       
>=dev-python/pygobject-3.40.1-r1:3[cairo?,${PYTHON_USEDEP}]
+                       x11-libs/gtk+:3[introspection]
+               )
        )
 "
 

Reply via email to