commit:     61ef921da450246955a5c0c2c5f0b3941aa9215c
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Tue Jan  6 03:32:33 2026 +0000
Commit:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
CommitDate: Tue Jan  6 03:32:33 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=61ef921d

dev-python/pyclip: enable tests

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-python/pyclip/pyclip-0.7.0-r2.ebuild | 19 +++++++++++++------
 dev-python/pyclip/pyclip-9999.ebuild     | 19 +++++++++++++------
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/dev-python/pyclip/pyclip-0.7.0-r2.ebuild 
b/dev-python/pyclip/pyclip-0.7.0-r2.ebuild
index 617092c347..7fc1ce4162 100644
--- a/dev-python/pyclip/pyclip-0.7.0-r2.ebuild
+++ b/dev-python/pyclip/pyclip-0.7.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{11..14} )
 
 DISTUTILS_USE_PEP517="setuptools"
 
-inherit distutils-r1
+inherit distutils-r1 virtualx
 
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
@@ -22,10 +22,10 @@ HOMEPAGE="https://pypi.org/project/pyclip/";
 LICENSE="Apache-2.0"
 SLOT="0"
 IUSE="wayland +X"
-REQUIRED_USE="|| ( wayland X )"
-
-# Needs a working xorg/wayland setup
-RESTRICT="test"
+REQUIRED_USE="
+       || ( wayland X )
+       test? ( X )
+"
 
 RDEPEND="
        wayland? ( gui-apps/wl-clipboard )
@@ -34,6 +34,9 @@ RDEPEND="
 
 DOCS=( docs/README.md )
 
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
 src_prepare() {
        # Clipboard detection should respect USE flags
        if use wayland && ! use X; then
@@ -44,6 +47,10 @@ src_prepare() {
        distutils-r1_src_prepare
 }
 
+src_test() {
+       virtx distutils-r1_src_test
+}
+
 pkg_postinst() {
        if use wayland && use X; then
                elog "If you wish to use the xclip backend over the 
wl-clipboard backend,"

diff --git a/dev-python/pyclip/pyclip-9999.ebuild 
b/dev-python/pyclip/pyclip-9999.ebuild
index 617092c347..7fc1ce4162 100644
--- a/dev-python/pyclip/pyclip-9999.ebuild
+++ b/dev-python/pyclip/pyclip-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{11..14} )
 
 DISTUTILS_USE_PEP517="setuptools"
 
-inherit distutils-r1
+inherit distutils-r1 virtualx
 
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
@@ -22,10 +22,10 @@ HOMEPAGE="https://pypi.org/project/pyclip/";
 LICENSE="Apache-2.0"
 SLOT="0"
 IUSE="wayland +X"
-REQUIRED_USE="|| ( wayland X )"
-
-# Needs a working xorg/wayland setup
-RESTRICT="test"
+REQUIRED_USE="
+       || ( wayland X )
+       test? ( X )
+"
 
 RDEPEND="
        wayland? ( gui-apps/wl-clipboard )
@@ -34,6 +34,9 @@ RDEPEND="
 
 DOCS=( docs/README.md )
 
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
 src_prepare() {
        # Clipboard detection should respect USE flags
        if use wayland && ! use X; then
@@ -44,6 +47,10 @@ src_prepare() {
        distutils-r1_src_prepare
 }
 
+src_test() {
+       virtx distutils-r1_src_test
+}
+
 pkg_postinst() {
        if use wayland && use X; then
                elog "If you wish to use the xclip backend over the 
wl-clipboard backend,"

Reply via email to