commit:     a0eece665f3c1c43e6bed799ead6190591296cfa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 27 10:08:51 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 27 10:12:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0eece66

dev-util/pkgcheck: enable py3.12

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/pkgcheck/pkgcheck-0.10.24.ebuild | 16 ++++++++++++++--
 dev-util/pkgcheck/pkgcheck-9999.ebuild    | 16 ++++++++++++++--
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/dev-util/pkgcheck/pkgcheck-0.10.24.ebuild 
b/dev-util/pkgcheck/pkgcheck-0.10.24.ebuild
index 60b9b8d6e828..2a3ddbf5026a 100644
--- a/dev-util/pkgcheck/pkgcheck-0.10.24.ebuild
+++ b/dev-util/pkgcheck/pkgcheck-0.10.24.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 inherit elisp-common distutils-r1 optfeature
 
 if [[ ${PV} == *9999 ]] ; then
@@ -50,7 +50,9 @@ BDEPEND="${RDEPEND}
        dev-python/wheel
        test? (
                dev-python/pytest[${PYTHON_USEDEP}]
-               dev-python/requests[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       dev-python/requests[${PYTHON_USEDEP}]
+               ' python3_{10..11} )
                dev-vcs/git
        )
 "
@@ -71,6 +73,16 @@ src_compile() {
        fi
 }
 
+python_test() {
+       if ! has_version -b "dev-python/requests[${PYTHON_USEDEP}" ; then
+               EPYTEST_DESELECT=(
+                       
tests/checks/test_all.py::TestNetworkCheck::test_network_enabled
+               )
+       fi
+
+       epytest
+}
+
 python_install_all() {
        local DOCS=( NEWS.rst )
        [[ ${PV} == *9999 ]] || doman man/*

diff --git a/dev-util/pkgcheck/pkgcheck-9999.ebuild 
b/dev-util/pkgcheck/pkgcheck-9999.ebuild
index 95b29b01a08f..223c78696997 100644
--- a/dev-util/pkgcheck/pkgcheck-9999.ebuild
+++ b/dev-util/pkgcheck/pkgcheck-9999.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 inherit elisp-common distutils-r1 optfeature
 
 if [[ ${PV} == *9999 ]] ; then
@@ -50,7 +50,9 @@ BDEPEND="${RDEPEND}
        dev-python/wheel
        test? (
                dev-python/pytest[${PYTHON_USEDEP}]
-               dev-python/requests[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       dev-python/requests[${PYTHON_USEDEP}]
+               ' python3_{10..11} )
                dev-vcs/git
        )
 "
@@ -71,6 +73,16 @@ src_compile() {
        fi
 }
 
+python_test() {
+       if ! has_version -b "dev-python/requests[${PYTHON_USEDEP}" ; then
+               EPYTEST_DESELECT=(
+                       
tests/checks/test_all.py::TestNetworkCheck::test_network_enabled
+               )
+       fi
+
+       epytest
+}
+
 python_install_all() {
        local DOCS=( NEWS.rst )
        [[ ${PV} == *9999 ]] || doman man/*

Reply via email to