commit:     facd8f13b66df5b00277066e556589fbe744c880
Author:     gentoo-setan <gentoo-setan <AT> protonmail <DOT> com>
AuthorDate: Wed Sep 11 10:14:32 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Sep 25 11:55:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=facd8f13

net-p2p/nicotine+: make tests work

- add broadway USE flag to test depends
- remove version check test violating network sandbox

Closes: https://bugs.gentoo.org/933741
Signed-off-by: gentoo-setan <gentoo-setan <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38563
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-p2p/nicotine+/nicotine+-3.3.4.ebuild | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/net-p2p/nicotine+/nicotine+-3.3.4.ebuild 
b/net-p2p/nicotine+/nicotine+-3.3.4.ebuild
index 4cc7bccb19fe..e98e68e13b9c 100644
--- a/net-p2p/nicotine+/nicotine+-3.3.4.ebuild
+++ b/net-p2p/nicotine+/nicotine+-3.3.4.ebuild
@@ -16,18 +16,38 @@ S="${WORKDIR}/nicotine-plus-${PV}"
 LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="amd64 ppc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
 
 # NOTE: good link - 
https://github.com/nicotine-plus/nicotine-plus/blob/master/doc/DEPENDENCIES.md
-BDEPEND="sys-devel/gettext" # TODO(setan): maybe add pycodestyle and pylint 
here if use test
+BDEPEND="
+       sys-devel/gettext
+       test? (
+               dev-python/pytest
+               || (
+                  >=gui-libs/gtk-4.6.9[broadway]
+                  >=x11-libs/gtk+-3.22.20:3[broadway]
+               )
+       )
+"
 RDEPEND="
        dev-python/pygobject:3[${PYTHON_USEDEP}]
-       || ( >=gui-libs/gtk-4.6.9[introspection] 
>=x11-libs/gtk+-3.22.20:3[introspection] )
+       || (
+               >=gui-libs/gtk-4.6.9[introspection]
+               >=x11-libs/gtk+-3.22.20:3[introspection]
+       )
 "
 
 distutils_enable_tests pytest
 
 DOCS=( AUTHORS.md NEWS.md README.md TRANSLATORS.md )
 
+src_prepare() {
+       default
+       # remove update check test violating network sandbox
+       sed -i -e 's:test_update_check:_&:' \
+               "${S}"/pynicotine/tests/unit/test_version.py || die
+}
 pkg_postinst() {
        xdg_pkg_postinst
 

Reply via email to