blob: 67af1d9235a0c002516ee72d92169e64ad7c6c3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="Modern, extensible Python project management"
HOMEPAGE="
https://github.com/pypa/hatch/
https://pypi.org/project/hatch/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-python/click-8.0.6[${PYTHON_USEDEP}]
>=dev-python/hatchling-1.24.2[${PYTHON_USEDEP}]
>=dev-python/httpx-0.22.0[${PYTHON_USEDEP}]
>=dev-python/hyperlink-21.0.0[${PYTHON_USEDEP}]
>=dev-python/keyring-23.5.0[${PYTHON_USEDEP}]
>=dev-python/packaging-24.2[${PYTHON_USEDEP}]
<dev-python/pexpect-5[${PYTHON_USEDEP}]
>=dev-python/pexpect-4.8[${PYTHON_USEDEP}]
>=dev-python/platformdirs-2.5.0[${PYTHON_USEDEP}]
dev-python/pyproject-hooks[${PYTHON_USEDEP}]
>=dev-python/rich-11.2.0[${PYTHON_USEDEP}]
>=dev-python/shellingham-1.4.0[${PYTHON_USEDEP}]
>=dev-python/tomli-w-1.0[${PYTHON_USEDEP}]
>=dev-python/tomlkit-0.11.1[${PYTHON_USEDEP}]
<dev-python/userpath-2[${PYTHON_USEDEP}]
>=dev-python/userpath-1.7[${PYTHON_USEDEP}]
>=dev-python/uv-0.1.35
>=dev-python/virtualenv-20.26.6[${PYTHON_USEDEP}]
<dev-python/zstandard-1[${PYTHON_USEDEP}]
"
BDEPEND="
>=dev-python/hatch-vcs-0.3.0[${PYTHON_USEDEP}]
test? (
dev-python/editables[${PYTHON_USEDEP}]
dev-python/filelock[${PYTHON_USEDEP}]
dev-python/flit-core[${PYTHON_USEDEP}]
dev-python/pyfakefs[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/trustme[${PYTHON_USEDEP}]
)
"
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
# we don't install .dist-info for uv
sed -i -e '/uv/d' pyproject.toml || die
}
python_test() {
local EPYTEST_DESELECT=(
# Internet
tests/cli/env/test_create.py::test_uv_env
)
local EPYTEST_IGNORE=(
# we're running these in dev-python/hatchling
tests/backend
)
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -p pytest_fakefs -p pytest_mock \
-m "not requires_internet and not requires_docker"
}
|