Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-manager/
Date: Fri, 19 Aug 2022 23:48:08
Message-Id: 1660952822.c4dba51dff6bf892456ab503ed10ad2b8b657cb0.sam@gentoo
1 commit: c4dba51dff6bf892456ab503ed10ad2b8b657cb0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 19 23:47:02 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 19 23:47:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4dba51d
7
8 app-emulation/virt-manager: enable tests, switch to USE=gui
9
10 Switch to USE=gui per QA policy [0]
11
12 [0] https://projects.gentoo.org/qa/policy-guide/use-flags.html#pg0802
13 Closes: https://bugs.gentoo.org/795912
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 .../virt-manager/virt-manager-4.1.0.ebuild | 69 +++++++++++++---------
17 .../virt-manager/virt-manager-9999.ebuild | 69 +++++++++++++---------
18 2 files changed, 84 insertions(+), 54 deletions(-)
19
20 diff --git a/app-emulation/virt-manager/virt-manager-4.1.0.ebuild b/app-emulation/virt-manager/virt-manager-4.1.0.ebuild
21 index 1957dacecac0..bfa4c0d573fd 100644
22 --- a/app-emulation/virt-manager/virt-manager-4.1.0.ebuild
23 +++ b/app-emulation/virt-manager/virt-manager-4.1.0.ebuild
24 @@ -5,29 +5,39 @@ EAPI=8
25
26 PYTHON_COMPAT=( python3_{8..11} )
27 DISTUTILS_SINGLE_IMPL=1
28 -
29 DISTUTILS_USE_SETUPTOOLS=no
30 inherit gnome2 distutils-r1 optfeature
31
32 DESCRIPTION="A graphical tool for administering virtual machines"
33 HOMEPAGE="https://virt-manager.org https://github.com/virt-manager/virt-manager"
34
35 -if [[ ${PV} = *9999* ]]; then
36 - inherit git-r3
37 - SRC_URI=""
38 +if [[ ${PV} == *9999* ]]; then
39 EGIT_REPO_URI="https://github.com/virt-manager/virt-manager.git"
40 EGIT_BRANCH="main"
41 + SRC_URI=""
42 + inherit git-r3
43 else
44 - SRC_URI="http://virt-manager.org/download/sources/${PN}/${P}.tar.gz"
45 + SRC_URI="https://virt-manager.org/download/sources/${PN}/${P}.tar.gz"
46 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
47 fi
48
49 LICENSE="GPL-2"
50 SLOT="0"
51 -IUSE="gtk policykit sasl"
52 +IUSE="gui policykit sasl"
53
54 -RDEPEND="${PYTHON_DEPS}
55 - gtk? (
56 +RDEPEND="
57 + ${PYTHON_DEPS}
58 + app-cdr/cdrtools
59 + >=app-emulation/libvirt-glib-1.0.0[introspection]
60 + >=sys-libs/libosinfo-0.2.10[introspection]
61 + $(python_gen_cond_dep '
62 + dev-libs/libxml2[python,${PYTHON_USEDEP}]
63 + dev-python/argcomplete[${PYTHON_USEDEP}]
64 + >=dev-python/libvirt-python-6.10.0[${PYTHON_USEDEP}]
65 + dev-python/pygobject:3[${PYTHON_USEDEP}]
66 + dev-python/requests[${PYTHON_USEDEP}]
67 + ')
68 + gui? (
69 >=net-libs/gtk-vnc-0.3.8[gtk3(+),introspection]
70 gnome-base/dconf
71 net-misc/spice-gtk[usbredir,gtk3,introspection,sasl?]
72 @@ -37,24 +47,27 @@ RDEPEND="${PYTHON_DEPS}
73 x11-libs/gtksourceview:4[introspection]
74 x11-libs/vte:2.91[introspection]
75 )
76 - app-cdr/cdrtools
77 - >=app-emulation/libvirt-glib-1.0.0[introspection]
78 - $(python_gen_cond_dep '
79 - >=dev-python/libvirt-python-6.10.0[${PYTHON_USEDEP}]
80 - dev-libs/libxml2[python,${PYTHON_USEDEP}]
81 - dev-python/argcomplete[${PYTHON_USEDEP}]
82 - dev-python/pygobject:3[${PYTHON_USEDEP}]
83 - dev-python/requests[${PYTHON_USEDEP}]
84 - ')
85 - >=sys-libs/libosinfo-0.2.10[introspection]
86 - "
87 +"
88 DEPEND="${RDEPEND}"
89 BDEPEND="dev-python/docutils"
90
91 DOCS=( README.md NEWS.md )
92
93 # Doesn't seem to play nicely in a sandboxed environment.
94 -RESTRICT="test"
95 +#RESTRICT="test"
96 +
97 +DISTUTILS_ARGS=(
98 + --no-update-icon-cache
99 + --no-compile-schemas
100 +)
101 +
102 +EPYTEST_IGNORE=(
103 + # Wants to use /tmp osinfo config?
104 + tests/test_cli.py
105 +
106 + # These seem to be essentially coverage tests
107 + tests/test_checkprops.py
108 +)
109
110 distutils_enable_tests pytest
111
112 @@ -62,17 +75,18 @@ python_configure() {
113 esetup.py configure --default-graphics=spice
114 }
115
116 -python_install() {
117 - esetup.py install
118 +python_test() {
119 + export VIRTINST_TEST_SUITE_FORCE_LIBOSINFO=0
120 +
121 + epytest
122 }
123
124 -src_install() {
125 - local DISTUTILS_ARGS=( --no-update-icon-cache --no-compile-schemas )
126 - distutils-r1_src_install
127 +python_install() {
128 + esetup.py install
129 }
130
131 pkg_preinst() {
132 - if use gtk; then
133 + if use gui ; then
134 gnome2_pkg_preinst
135
136 cd "${ED}" || die
137 @@ -87,7 +101,8 @@ pkg_preinst() {
138 }
139
140 pkg_postinst() {
141 - use gtk && gnome2_pkg_postinst
142 + use gui && gnome2_pkg_postinst
143 +
144 optfeature "SSH_ASKPASS program implementation" lxqt-base/lxqt-openssh-askpass net-misc/ssh-askpass-fullscreen net-misc/x11-ssh-askpass
145 optfeature "QEMU host support" app-emulation/qemu[usbredir,spice]
146 }
147
148 diff --git a/app-emulation/virt-manager/virt-manager-9999.ebuild b/app-emulation/virt-manager/virt-manager-9999.ebuild
149 index 1957dacecac0..bfa4c0d573fd 100644
150 --- a/app-emulation/virt-manager/virt-manager-9999.ebuild
151 +++ b/app-emulation/virt-manager/virt-manager-9999.ebuild
152 @@ -5,29 +5,39 @@ EAPI=8
153
154 PYTHON_COMPAT=( python3_{8..11} )
155 DISTUTILS_SINGLE_IMPL=1
156 -
157 DISTUTILS_USE_SETUPTOOLS=no
158 inherit gnome2 distutils-r1 optfeature
159
160 DESCRIPTION="A graphical tool for administering virtual machines"
161 HOMEPAGE="https://virt-manager.org https://github.com/virt-manager/virt-manager"
162
163 -if [[ ${PV} = *9999* ]]; then
164 - inherit git-r3
165 - SRC_URI=""
166 +if [[ ${PV} == *9999* ]]; then
167 EGIT_REPO_URI="https://github.com/virt-manager/virt-manager.git"
168 EGIT_BRANCH="main"
169 + SRC_URI=""
170 + inherit git-r3
171 else
172 - SRC_URI="http://virt-manager.org/download/sources/${PN}/${P}.tar.gz"
173 + SRC_URI="https://virt-manager.org/download/sources/${PN}/${P}.tar.gz"
174 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
175 fi
176
177 LICENSE="GPL-2"
178 SLOT="0"
179 -IUSE="gtk policykit sasl"
180 +IUSE="gui policykit sasl"
181
182 -RDEPEND="${PYTHON_DEPS}
183 - gtk? (
184 +RDEPEND="
185 + ${PYTHON_DEPS}
186 + app-cdr/cdrtools
187 + >=app-emulation/libvirt-glib-1.0.0[introspection]
188 + >=sys-libs/libosinfo-0.2.10[introspection]
189 + $(python_gen_cond_dep '
190 + dev-libs/libxml2[python,${PYTHON_USEDEP}]
191 + dev-python/argcomplete[${PYTHON_USEDEP}]
192 + >=dev-python/libvirt-python-6.10.0[${PYTHON_USEDEP}]
193 + dev-python/pygobject:3[${PYTHON_USEDEP}]
194 + dev-python/requests[${PYTHON_USEDEP}]
195 + ')
196 + gui? (
197 >=net-libs/gtk-vnc-0.3.8[gtk3(+),introspection]
198 gnome-base/dconf
199 net-misc/spice-gtk[usbredir,gtk3,introspection,sasl?]
200 @@ -37,24 +47,27 @@ RDEPEND="${PYTHON_DEPS}
201 x11-libs/gtksourceview:4[introspection]
202 x11-libs/vte:2.91[introspection]
203 )
204 - app-cdr/cdrtools
205 - >=app-emulation/libvirt-glib-1.0.0[introspection]
206 - $(python_gen_cond_dep '
207 - >=dev-python/libvirt-python-6.10.0[${PYTHON_USEDEP}]
208 - dev-libs/libxml2[python,${PYTHON_USEDEP}]
209 - dev-python/argcomplete[${PYTHON_USEDEP}]
210 - dev-python/pygobject:3[${PYTHON_USEDEP}]
211 - dev-python/requests[${PYTHON_USEDEP}]
212 - ')
213 - >=sys-libs/libosinfo-0.2.10[introspection]
214 - "
215 +"
216 DEPEND="${RDEPEND}"
217 BDEPEND="dev-python/docutils"
218
219 DOCS=( README.md NEWS.md )
220
221 # Doesn't seem to play nicely in a sandboxed environment.
222 -RESTRICT="test"
223 +#RESTRICT="test"
224 +
225 +DISTUTILS_ARGS=(
226 + --no-update-icon-cache
227 + --no-compile-schemas
228 +)
229 +
230 +EPYTEST_IGNORE=(
231 + # Wants to use /tmp osinfo config?
232 + tests/test_cli.py
233 +
234 + # These seem to be essentially coverage tests
235 + tests/test_checkprops.py
236 +)
237
238 distutils_enable_tests pytest
239
240 @@ -62,17 +75,18 @@ python_configure() {
241 esetup.py configure --default-graphics=spice
242 }
243
244 -python_install() {
245 - esetup.py install
246 +python_test() {
247 + export VIRTINST_TEST_SUITE_FORCE_LIBOSINFO=0
248 +
249 + epytest
250 }
251
252 -src_install() {
253 - local DISTUTILS_ARGS=( --no-update-icon-cache --no-compile-schemas )
254 - distutils-r1_src_install
255 +python_install() {
256 + esetup.py install
257 }
258
259 pkg_preinst() {
260 - if use gtk; then
261 + if use gui ; then
262 gnome2_pkg_preinst
263
264 cd "${ED}" || die
265 @@ -87,7 +101,8 @@ pkg_preinst() {
266 }
267
268 pkg_postinst() {
269 - use gtk && gnome2_pkg_postinst
270 + use gui && gnome2_pkg_postinst
271 +
272 optfeature "SSH_ASKPASS program implementation" lxqt-base/lxqt-openssh-askpass net-misc/ssh-askpass-fullscreen net-misc/x11-ssh-askpass
273 optfeature "QEMU host support" app-emulation/qemu[usbredir,spice]
274 }