commit:     e49f92af61c3bac6df1295c2ddc52719c91b934f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 11 17:24:52 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 11 17:54:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e49f92af

dev-python/hatchling: Enable py3.11

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

 dev-python/hatchling/hatchling-0.24.0.ebuild | 30 +++++++++++++++-------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/dev-python/hatchling/hatchling-0.24.0.ebuild 
b/dev-python/hatchling/hatchling-0.24.0.ebuild
index 5cabb7946eb7..c36ac5b6d543 100644
--- a/dev-python/hatchling/hatchling-0.24.0.ebuild
+++ b/dev-python/hatchling/hatchling-0.24.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
 
 inherit distutils-r1
 
@@ -35,25 +35,27 @@ 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}]
-               dev-python/tomli-w[${PYTHON_USEDEP}]
-               dev-python/virtualenv[${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}]
+                       dev-python/tomli-w[${PYTHON_USEDEP}]
+                       dev-python/virtualenv[${PYTHON_USEDEP}]
+               ' pypy3 python3_{8..10}  # TODO: 3.11 when deps are ported
+               )
        )
 "
 
 distutils_enable_tests pytest
 
-python_compile() {
-       # TODO: remove this when gpep517 is the norm
-       local -x PYTHONPATH=src
-       distutils-r1_python_compile
-}
-
 python_test() {
+       if ! has "${EPYTHON}" pypy3 python3.{8..10}; 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