dev-python/pyclip: enable tests

Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2026-01-06 12:32:33 +09:00
parent 05986b4d73
commit 61ef921da4
2 changed files with 26 additions and 12 deletions

View File

@@ -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,"

View File

@@ -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,"