blob: 467c05edd319e302babd6dc50bcd9251d47c8203 (
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=pdm-backend
PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="Python package and dependency manager supporting the latest PEP standards"
HOMEPAGE="
https://pdm-project.org/
https://github.com/pdm-project/pdm/
https://pypi.org/project/pdm/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RDEPEND="
dev-python/certifi[${PYTHON_USEDEP}]
>=dev-python/dep-logic-0.5[${PYTHON_USEDEP}]
<dev-python/findpython-1[${PYTHON_USEDEP}]
>=dev-python/findpython-0.6.0[${PYTHON_USEDEP}]
dev-python/blinker[${PYTHON_USEDEP}]
dev-python/filelock[${PYTHON_USEDEP}]
>=dev-python/hishel-0.0.32[${PYTHON_USEDEP}]
>=dev-python/httpcore-1.0.6[${PYTHON_USEDEP}]
dev-python/httpx[${PYTHON_USEDEP}]
>=dev-python/id-1.5.0[${PYTHON_USEDEP}]
dev-python/installer[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
>=dev-python/pbs-installer-2024.4.18[${PYTHON_USEDEP}]
dev-python/platformdirs[${PYTHON_USEDEP}]
dev-python/pyproject-hooks[${PYTHON_USEDEP}]
dev-python/python-dotenv[${PYTHON_USEDEP}]
>=dev-python/resolvelib-1.1[${PYTHON_USEDEP}]
dev-python/rich[${PYTHON_USEDEP}]
dev-python/shellingham[${PYTHON_USEDEP}]
dev-python/tomlkit[${PYTHON_USEDEP}]
>=dev-python/truststore-0.9[${PYTHON_USEDEP}]
>=dev-python/unearth-0.17.5[${PYTHON_USEDEP}]
dev-python/virtualenv[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/tomli[${PYTHON_USEDEP}]
' 3.10)
"
BDEPEND="
${RDEPEND}
test? (
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/pytest-httpserver[${PYTHON_USEDEP}]
dev-python/pytest-httpx[${PYTHON_USEDEP}]
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
dev-python/uv
)
"
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_prepare() {
local PATCHES=(
# https://github.com/pdm-project/pdm/issues/3486
"${FILESDIR}/${PN}-2.24.0-respect-python.patch"
)
distutils-r1_src_prepare
# unpin deps
sed -i -e 's:,<[0-9.a]*::' pyproject.toml || die
}
python_test() {
local EPYTEST_DESELECT=(
# Internet
# https://github.com/pdm-project/pdm/pull/3488
# (the third one I can't reproduce)
tests/models/test_candidates.py::test_find_candidates_from_find_links
'tests/test_project.py::test_find_interpreters_with_PDM_IGNORE_ACTIVE_VENV[True]'
'tests/models/test_candidates.py::test_expand_project_root_in_url[demo @ file:///${PROJECT_ROOT}/tests/fixtures/artifacts/demo-0.0.1.tar.gz]'
# unhappy about extra packages being installed?
# (also fails randomly in venv)
tests/cli/test_build.py::test_build_with_no_isolation
)
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -m "not network and not integration and not path" \
-p pytest_mock -p pytest_httpx -p pytest_httpserver
}
|