commit:     b973812635d7156ab4b75b6a7a7bac292131c2ca
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  7 09:27:13 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr  7 09:27:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9738126

dev-python/hatchling: Enable pypy3

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/hatchling/hatchling-0.22.0.ebuild | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/dev-python/hatchling/hatchling-0.22.0.ebuild 
b/dev-python/hatchling/hatchling-0.22.0.ebuild
index 72e3b3bb04e8..992bc68216bc 100644
--- a/dev-python/hatchling/hatchling-0.22.0.ebuild
+++ b/dev-python/hatchling/hatchling-0.22.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..10} )
 
 inherit distutils-r1
 
@@ -35,11 +35,13 @@ RDEPEND="
 BDEPEND="
        ${RDEPEND}
        test? (
-               dev-python/atomicwrites[${PYTHON_USEDEP}]
-               dev-python/click[${PYTHON_USEDEP}]
-               dev-python/httpx[${PYTHON_USEDEP}]
-               dev-python/platformdirs[${PYTHON_USEDEP}]
-               dev-python/rich[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       dev-python/atomicwrites[${PYTHON_USEDEP}]
+                       dev-python/click[${PYTHON_USEDEP}]
+                       dev-python/httpx[${PYTHON_USEDEP}]
+                       dev-python/platformdirs[${PYTHON_USEDEP}]
+                       dev-python/rich[${PYTHON_USEDEP}]
+               ' 'python*')
        )
 "
 
@@ -52,6 +54,11 @@ python_compile() {
 }
 
 python_test() {
+       if [[ ${EPYTHON} != python* ]]; then
+               einfo "Skipping tests on ${EPYTHON}"
+               return
+       fi
+
        local -x EPYTEST_DESELECT=(
                # these run pip to install stuff
                tests/backend/dep/test_core.py::test_dependency_found

Reply via email to