commit:     4dff98b40049347c8063fa0edb2ce86dcd21cbae
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 29 19:14:06 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 29 19:15:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dff98b4

www-client/pybugz: (live) flit, add test, enable py3.12

Thanks to moving to flit upstream, the install is much simpler.
Add a basic test for verifying the tools works (needs network).
Enable py3.12

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 www-client/pybugz/pybugz-9999.ebuild | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/www-client/pybugz/pybugz-9999.ebuild 
b/www-client/pybugz/pybugz-9999.ebuild
index 17680b4e1e24..95086a2d7f65 100644
--- a/www-client/pybugz/pybugz-9999.ebuild
+++ b/www-client/pybugz/pybugz-9999.ebuild
@@ -3,11 +3,11 @@
 
 EAPI=8
 
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=flit
+PYTHON_COMPAT=( python3_{10..12} )
 PYTHON_REQ_USE="readline(+),ssl(+)"
 
-if [ "${PV}" = "9999" ]; then
+if [[ ${PV} = "9999" ]]; then
        EGIT_REPO_URI="https://github.com/williamh/pybugz.git";
        inherit git-r3
 else
@@ -15,18 +15,18 @@ else
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
 fi
 
-inherit bash-completion-r1 distutils-r1
+inherit distutils-r1
 
 DESCRIPTION="Command line interface to (Gentoo) Bugzilla"
 HOMEPAGE="https://github.com/williamh/pybugz";
 
 LICENSE="GPL-2"
 SLOT="0"
+RESTRICT="test"
+PROPERTIES="test_network"
 
-python_install_all() {
-       distutils-r1_python_install_all
-       newbashcomp contrib/bash-completion bugz
-
-       insinto /usr/share/zsh/site-functions
-       newins contrib/zsh-completion _pybugz
+python_test() {
+       # not the highest quality of test, but checks many parts of the code 
work.
+       # good enough for PYTHON_COMPAT checks.
+       "${EPYTHON}" lbugz get 784263 || die "Tests failed with ${EPYTHON}"
 }

Reply via email to