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

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-05-23 18:52:10 +02:00
parent 2345d9c6e0
commit 038e94a19b
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E

View File

@ -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