commit:     038e94a19b097e5c186a09403e8853b2ffd08416
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 23 16:52:10 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 23 16:52:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=038e94a1

dev-python/hatchling: Do not add pytest dep for non-PYTHON_TESTED

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

 dev-python/hatchling/hatchling-1.27.0.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-python/hatchling/hatchling-1.27.0.ebuild 
b/dev-python/hatchling/hatchling-1.27.0.ebuild
index a853e7f4c6db..a053ebfe7b61 100644
--- a/dev-python/hatchling/hatchling-1.27.0.ebuild
+++ b/dev-python/hatchling/hatchling-1.27.0.ebuild
@@ -25,6 +25,8 @@ S=${WORKDIR}/${MY_P}/backend
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv 
~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos 
~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
 
 # deps are listed in backend/src/hatchling/ouroboros.py
 # editables are optional but required for editable installs
@@ -46,6 +48,7 @@ BDEPEND="
                        dev-python/click[${PYTHON_USEDEP}]
                        dev-python/httpx[${PYTHON_USEDEP}]
                        dev-python/platformdirs[${PYTHON_USEDEP}]
+                       dev-python/pytest[${PYTHON_USEDEP}]
                        dev-python/pytest-mock[${PYTHON_USEDEP}]
                        dev-python/rich[${PYTHON_USEDEP}]
                        dev-python/tomli-w[${PYTHON_USEDEP}]
@@ -54,8 +57,6 @@ BDEPEND="
        )
 "
 
-distutils_enable_tests pytest
-
 src_test() {
        # top-level "tests" directory contains tests both for hatch
        # and hatchling

Reply via email to