commit:     a07e2a8c90a4307ef9eccd6c7605568eb692a0f1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 14:47:04 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 14:56:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a07e2a8c

dev-python/pygobject: Skip tests on py2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygobject/pygobject-3.34.0.ebuild | 18 +++++++++++++-----
 dev-python/pygobject/pygobject-3.36.1.ebuild | 18 +++++++++++++-----
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/dev-python/pygobject/pygobject-3.34.0.ebuild 
b/dev-python/pygobject/pygobject-3.34.0.ebuild
index d7583e57c7b..daaf30dc04d 100644
--- a/dev-python/pygobject/pygobject-3.34.0.ebuild
+++ b/dev-python/pygobject/pygobject-3.34.0.ebuild
@@ -27,11 +27,14 @@ RDEPEND="${PYTHON_DEPS}
 "
 DEPEND="${RDEPEND}
        test? (
-               dev-libs/atk[introspection]
-               dev-python/pytest[${PYTHON_USEDEP}]
-               x11-libs/gdk-pixbuf:2[introspection,jpeg]
-               x11-libs/gtk+:3[introspection]
-               x11-libs/pango[introspection] )
+               $(python_gen_cond_dep '
+                       dev-libs/atk[introspection]
+                       dev-python/pytest[${PYTHON_USEDEP}]
+                       x11-libs/gdk-pixbuf:2[introspection,jpeg]
+                       x11-libs/gtk+:3[introspection]
+                       x11-libs/pango[introspection]
+               ' -3)
+       )
 "
 BDEPEND="
        virtual/pkgconfig
@@ -59,6 +62,11 @@ src_test() {
        local -x GIO_USE_VOLUME_MONITOR="unix" # prevent udisks-related 
failures in chroots, bug #449484
 
        testing() {
+               if ! python_is_python3; then
+                       einfo "Skipping tests on Python 2 to unblock deps"
+                       return
+               fi
+
                local -x XDG_CACHE_HOME="${T}/${EPYTHON}"
                meson_src_test || die "test failed for ${EPYTHON}"
        }

diff --git a/dev-python/pygobject/pygobject-3.36.1.ebuild 
b/dev-python/pygobject/pygobject-3.36.1.ebuild
index b4bc8e3bab4..16c01852942 100644
--- a/dev-python/pygobject/pygobject-3.36.1.ebuild
+++ b/dev-python/pygobject/pygobject-3.36.1.ebuild
@@ -27,11 +27,14 @@ RDEPEND="${PYTHON_DEPS}
 "
 DEPEND="${RDEPEND}
        test? (
-               dev-libs/atk[introspection]
-               dev-python/pytest[${PYTHON_USEDEP}]
-               x11-libs/gdk-pixbuf:2[introspection,jpeg]
-               x11-libs/gtk+:3[introspection]
-               x11-libs/pango[introspection] )
+               $(python_gen_cond_dep '
+                       dev-libs/atk[introspection]
+                       dev-python/pytest[${PYTHON_USEDEP}]
+                       x11-libs/gdk-pixbuf:2[introspection,jpeg]
+                       x11-libs/gtk+:3[introspection]
+                       x11-libs/pango[introspection]
+               ' -3)
+       )
 "
 BDEPEND="
        virtual/pkgconfig
@@ -59,6 +62,11 @@ src_test() {
        local -x GIO_USE_VOLUME_MONITOR="unix" # prevent udisks-related 
failures in chroots, bug #449484
 
        testing() {
+               if ! python_is_python3; then
+                       einfo "Skipping tests on Python 2 to unblock deps"
+                       return
+               fi
+
                local -x XDG_CACHE_HOME="${T}/${EPYTHON}"
                meson_src_test || die "test failed for ${EPYTHON}"
        }

Reply via email to