1 |
|
# Copyright 1999-2020 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
DESCRIPTION="Library for parsing dsh.style configuration files"
|
7 |
|
HOMEPAGE="http://www.netfort.gr.jp/~dancer/software/downloads/"
|
8 |
|
SRC_URI="http://www.netfort.gr.jp/~dancer/software/downloads/${P}.tar.gz"
|
|
6 |
DISTUTILS_USE_PEP517=setuptools
|
|
7 |
PYTHON_COMPAT=( python3_{11..13} pypy3_11 )
|
|
8 |
PYTHON_REQ_USE="threads(+)"
|
|
9 |
|
|
10 |
inherit distutils-r1
|
|
11 |
|
|
12 |
MY_P=${P/_beta/b}
|
|
13 |
DESCRIPTION="Python code static checker"
|
|
14 |
HOMEPAGE="
|
|
15 |
https://pypi.org/project/pylint/
|
|
16 |
https://github.com/pylint-dev/pylint/
|
|
17 |
"
|
|
18 |
SRC_URI="
|
|
19 |
https://github.com/pylint-dev/pylint/archive/v${PV/_beta/b}.tar.gz
|
|
20 |
-> ${MY_P}.gh.tar.gz
|
|
21 |
"
|
|
22 |
S=${WORKDIR}/${MY_P}
|
9 |
23 |
|
10 |
24 |
LICENSE="GPL-2"
|
11 |
25 |
SLOT="0"
|
12 |
|
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
|
|
26 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
|
27 |
IUSE="examples"
|
13 |
28 |
|
14 |
|
RDEPEND="virtual/ssh"
|
|
29 |
RDEPEND="
|
|
30 |
<dev-python/astroid-3.4[${PYTHON_USEDEP}]
|
|
31 |
>=dev-python/astroid-3.3.8[${PYTHON_USEDEP}]
|
|
32 |
>=dev-python/dill-0.3.7[${PYTHON_USEDEP}]
|
|
33 |
>=dev-python/isort-4.2.5[${PYTHON_USEDEP}]
|
|
34 |
<dev-python/isort-7[${PYTHON_USEDEP}]
|
|
35 |
>=dev-python/mccabe-0.6[${PYTHON_USEDEP}]
|
|
36 |
<dev-python/mccabe-0.8[${PYTHON_USEDEP}]
|
|
37 |
>=dev-python/platformdirs-2.2.0[${PYTHON_USEDEP}]
|
|
38 |
>=dev-python/tomlkit-0.10.1[${PYTHON_USEDEP}]
|
|
39 |
"
|
|
40 |
BDEPEND="
|
|
41 |
test? (
|
|
42 |
$(python_gen_cond_dep '
|
|
43 |
>=dev-python/gitpython-3[${PYTHON_USEDEP}]
|
|
44 |
' 'python*' )
|
|
45 |
>=dev-python/pytest-8.3[${PYTHON_USEDEP}]
|
|
46 |
dev-python/pytest-timeout[${PYTHON_USEDEP}]
|
|
47 |
>=dev-python/typing-extensions-4.12[${PYTHON_USEDEP}]
|
|
48 |
)
|
|
49 |
"
|
|
50 |
|
|
51 |
distutils_enable_tests pytest
|
|
52 |
|
|
53 |
python_test() {
|
|
54 |
local EPYTEST_DESELECT=(
|
|
55 |
# TODO
|
|
56 |
'tests/test_functional.py::test_functional[dataclass_with_field]'
|
|
57 |
'tests/test_functional.py::test_functional[no_name_in_module]'
|
|
58 |
'tests/test_functional.py::test_functional[shadowed_import]'
|
|
59 |
'tests/test_functional.py::test_functional[use_yield_from]'
|
|
60 |
'tests/test_functional.py::test_functional[wrong_import_order]'
|
|
61 |
)
|
|
62 |
local EPYTEST_IGNORE=(
|
|
63 |
# No need to run the benchmarks
|
|
64 |
tests/benchmark/test_baseline_benchmarks.py
|
|
65 |
)
|
|
66 |
|
|
67 |
if ! has_version "dev-python/gitpython[${PYTHON_USEDEP}]"; then
|
|
68 |
EPYTEST_IGNORE+=(
|
|
69 |
tests/profile/test_profile_against_externals.py
|
|
70 |
tests/testutils/_primer/test_package_to_lint.py
|
|
71 |
tests/testutils/_primer/test_primer.py
|
|
72 |
)
|
|
73 |
fi
|
15 |
74 |
|
16 |
|
src_configure() {
|
17 |
|
econf --disable-static
|
|
75 |
rm -rf pylint || die
|
|
76 |
|
|
77 |
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
|
78 |
epytest -p timeout
|
18 |
79 |
}
|
19 |
80 |
|
20 |
|
src_install() {
|
21 |
|
default
|
|
81 |
python_install_all() {
|
|
82 |
if use examples ; then
|
|
83 |
docompress -x "/usr/share/doc/${PF}/examples"
|
|
84 |
docinto examples
|
|
85 |
dodoc -r examples/.
|
|
86 |
fi
|
22 |
87 |
|
23 |
|
# no static archives
|
24 |
|
find "${D}" -name '*.la' -delete || die
|
|
88 |
distutils-r1_python_install_all
|
25 |
89 |
}
|