Gentoo Archives: gentoo-commits

From: Ryan Fox <flewkey@××××.party>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pyclip/
Date: Thu, 26 May 2022 20:43:23
Message-Id: 1653585880.a5e3b8259c87d2176dbaf2c65a6403a3fc2beabc.flewkey@gentoo
1 commit: a5e3b8259c87d2176dbaf2c65a6403a3fc2beabc
2 Author: Ryan Fox <flewkey <AT> 2a03 <DOT> party>
3 AuthorDate: Thu May 26 17:24:40 2022 +0000
4 Commit: Ryan Fox <flewkey <AT> 2a03 <DOT> party>
5 CommitDate: Thu May 26 17:24:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a5e3b825
7
8 dev-python/pyclip: Fix tests
9
10 Closes: https://bugs.gentoo.org/847169
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Ryan Fox <flewkey <AT> 2a03.party>
13
14 dev-python/pyclip/pyclip-0.5.4.ebuild | 20 +++++++++++++++-----
15 dev-python/pyclip/pyclip-0.6.0.ebuild | 12 ++++++++++--
16 dev-python/pyclip/pyclip-9999.ebuild | 12 ++++++++++--
17 3 files changed, 35 insertions(+), 9 deletions(-)
18
19 diff --git a/dev-python/pyclip/pyclip-0.5.4.ebuild b/dev-python/pyclip/pyclip-0.5.4.ebuild
20 index ee9f89570..4bcb1c89a 100644
21 --- a/dev-python/pyclip/pyclip-0.5.4.ebuild
22 +++ b/dev-python/pyclip/pyclip-0.5.4.ebuild
23 @@ -1,9 +1,9 @@
24 # Copyright 1999-2022 Gentoo Authors
25 # Distributed under the terms of the GNU General Public License v2
26
27 -EAPI=7
28 +EAPI=8
29
30 -PYTHON_COMPAT=( python3_{7..11} )
31 +PYTHON_COMPAT=( python3_{8..11} )
32 DISTUTILS_USE_SETUPTOOLS=bdepend
33
34 inherit distutils-r1
35 @@ -20,9 +20,19 @@ DESCRIPTION="Python clipboard module"
36 HOMEPAGE="https://pypi.org/project/pyclip/"
37 LICENSE="Apache-2.0"
38 SLOT="0"
39 +IUSE="test"
40 +RESTRICT="!test? ( test )"
41
42 -DEPEND=""
43 -RDEPEND="x11-misc/xclip"
44 +DEPEND="
45 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )
46 +"
47 +RDEPEND="
48 + x11-misc/xclip
49 +"
50 BDEPEND=""
51
52 -distutils_enable_tests pytest
53 +python_test() {
54 + for unittest in "${S}/tests/"*".py"; do
55 + "${EPYTHON}" "${unittest}" || die "Tests failed"
56 + done
57 +}
58
59 diff --git a/dev-python/pyclip/pyclip-0.6.0.ebuild b/dev-python/pyclip/pyclip-0.6.0.ebuild
60 index 997c812c2..409487c50 100644
61 --- a/dev-python/pyclip/pyclip-0.6.0.ebuild
62 +++ b/dev-python/pyclip/pyclip-0.6.0.ebuild
63 @@ -20,12 +20,20 @@ DESCRIPTION="Python clipboard module"
64 HOMEPAGE="https://pypi.org/project/pyclip/"
65 LICENSE="Apache-2.0"
66 SLOT="0"
67 +IUSE="test"
68 +RESTRICT="!test? ( test )"
69
70 -DEPEND=""
71 +DEPEND="
72 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )
73 +"
74 RDEPEND="
75 gui-apps/wl-clipboard
76 x11-misc/xclip
77 "
78 BDEPEND=""
79
80 -distutils_enable_tests pytest
81 +python_test() {
82 + for unittest in "${S}/tests/"*".py"; do
83 + "${EPYTHON}" "${unittest}" || die "Tests failed"
84 + done
85 +}
86
87 diff --git a/dev-python/pyclip/pyclip-9999.ebuild b/dev-python/pyclip/pyclip-9999.ebuild
88 index 997c812c2..409487c50 100644
89 --- a/dev-python/pyclip/pyclip-9999.ebuild
90 +++ b/dev-python/pyclip/pyclip-9999.ebuild
91 @@ -20,12 +20,20 @@ DESCRIPTION="Python clipboard module"
92 HOMEPAGE="https://pypi.org/project/pyclip/"
93 LICENSE="Apache-2.0"
94 SLOT="0"
95 +IUSE="test"
96 +RESTRICT="!test? ( test )"
97
98 -DEPEND=""
99 +DEPEND="
100 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )
101 +"
102 RDEPEND="
103 gui-apps/wl-clipboard
104 x11-misc/xclip
105 "
106 BDEPEND=""
107
108 -distutils_enable_tests pytest
109 +python_test() {
110 + for unittest in "${S}/tests/"*".py"; do
111 + "${EPYTHON}" "${unittest}" || die "Tests failed"
112 + done
113 +}