net-im/poezio: Fix running tests, use correct deps
authorMichał Górny <mgorny@gentoo.org>
Sat, 18 Apr 2020 09:32:46 +0000 (11:32 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sat, 18 Apr 2020 09:39:08 +0000 (11:39 +0200)
Upstream uses pytest in tests, so we need to depend on it.  Using pytest
also avoids failures due to missing optional runtime deps that are not
used in tests at all.

Closes: https://bugs.gentoo.org/717884
Signed-off-by: Michał Górny <mgorny@gentoo.org>
net-im/poezio/poezio-0.12.ebuild
net-im/poezio/poezio-9999.ebuild

index d41241885592b584270d457fbf7e8addc27025cf..435612e4aec74369d7e3878e8ef87479b2f7ef4f 100644 (file)
@@ -10,8 +10,6 @@ DESCRIPTION="Console XMPP client that looks like most famous IRC clients"
 HOMEPAGE="https://poez.io/"
 LICENSE="ZLIB"
 SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
 
 if [[ "${PV}" == "9999" ]]; then
        EGIT_REPO_URI="https://git.poez.io/${PN}.git"
@@ -27,12 +25,8 @@ RDEPEND="
        dev-python/pyasn1[${PYTHON_USEDEP}]
        dev-python/slixmpp[${PYTHON_USEDEP}]
 "
-DEPEND="
-       test? (
-               ${RDEPEND}
-               dev-python/potr
-               dev-python/pyinotify
-       )"
+
+distutils_enable_tests pytest
 
 DOC_CONTENTS="
 Install these optional runtime dependencies for additional features.
@@ -55,7 +49,3 @@ src_install() {
 pkg_postinst() {
        readme.gentoo_print_elog
 }
-
-python_test() {
-       esetup.py test
-}
index 14be76f1d818ecebe41662c09a730d364ae457db..2946371c46b8f5026c60b9ea10730308e50c205b 100644 (file)
@@ -10,8 +10,6 @@ DESCRIPTION="Console XMPP client that looks like most famous IRC clients"
 HOMEPAGE="https://poez.io/"
 LICENSE="ZLIB"
 SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
 
 if [[ "${PV}" == "9999" ]]; then
        EGIT_REPO_URI="https://lab.louiz.org/${PN}/${PN}.git"
@@ -27,12 +25,8 @@ RDEPEND="
        dev-python/pyasn1[${PYTHON_USEDEP}]
        dev-python/slixmpp[${PYTHON_USEDEP}]
 "
-DEPEND="
-       test? (
-               ${RDEPEND}
-               dev-python/potr
-               dev-python/pyinotify
-       )"
+
+distutils_enable_tests pytest
 
 DOC_CONTENTS="
 Install these optional runtime dependencies for additional features.
@@ -55,7 +49,3 @@ src_install() {
 pkg_postinst() {
        readme.gentoo_print_elog
 }
-
-python_test() {
-       esetup.py test
-}