commit: 1762dc026e2d1fe3d22bedef33b7346b7172024e
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 22 17:09:55 2021 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 22 17:20:49 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1762dc02
net-news/canto-daemon: enable py3.10, enable tests
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
net-news/canto-daemon/canto-daemon-0.9.8.ebuild | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/net-news/canto-daemon/canto-daemon-0.9.8.ebuild
b/net-news/canto-daemon/canto-daemon-0.9.8.ebuild
index e9126d4bcac..d0cff11389b 100644
--- a/net-news/canto-daemon/canto-daemon-0.9.8.ebuild
+++ b/net-news/canto-daemon/canto-daemon-0.9.8.ebuild
@@ -4,21 +4,25 @@
EAPI=8
DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{8,9} )
+PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit distutils-r1 multilib
DESCRIPTION="Daemon part of Canto-NG RSS reader"
HOMEPAGE="https://codezen.org/canto-ng/"
SRC_URI="https://github.com/themoken/canto-next/archive/v${PV}.tar.gz ->
${P}.tar.gz"
+S="${WORKDIR}/canto-next-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
+IUSE="test"
-RDEPEND="dev-python/feedparser[${PYTHON_USEDEP}]"
+RESTRICT="test"
+PROPERTIES="test_network"
-S="${WORKDIR}/canto-next-${PV}"
+RDEPEND="dev-python/feedparser[${PYTHON_USEDEP}]"
+BDEPEND="test? ( ${RDEPEND} )"
python_prepare_all() {
# Respect libdir during plugins installation
@@ -26,3 +30,10 @@ python_prepare_all() {
distutils-r1_python_prepare_all
}
+
+python_test() {
+ local test_file
+ for test_file in tests/*; do
+ "${EPYTHON}" "${test_file}" || die "Test ${test_file} failed
with ${EPYTHON}"
+ done
+}