blob: 520899ca8c4c0e039aaabf711a5ddc4ab6c3afd3 (
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
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=standalone
PYPI_NO_NORMALIZE=1
PYTHON_COMPAT=( python3_{11..14} )
inherit distutils-r1 pypi
DESCRIPTION="Python bindings for libssh client specific to Ansible use case"
HOMEPAGE="
https://github.com/ansible/pylibssh/
https://pypi.org/project/ansible-pylibssh/
"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
# keywords needed for ansible
# ~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~x64-macos
RDEPEND="
>=net-libs/libssh-0.9.0:=
"
BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
dev-python/expandvars[${PYTHON_USEDEP}]
dev-python/setuptools-scm[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
virtual/ssh
)
"
EPYTEST_PLUGINS=()
# tests have tendency to hang if something goes wrong
: ${EPYTEST_TIMEOUT:=30}
EPYTEST_XDIST=1
distutils_enable_tests pytest
python_test() {
# Tests require an account that you can login to.
# They would work by spawning sshd with PermitEmptyPasswords and then ssh'in in with the current user.
# "portage" and every other portage installable user is nologin.
# Adding a user that allows logging in does not seem reasonable.
EPYTEST_IGNORE=(
tests/unit/scp_test.py
tests/unit/sftp_test.py
tests/unit/channel_test.py
)
EPYTEST_DESELECT=(
tests/integration/sshd_test.py::test_sshd_addr_fixture_port
)
# pytest.ini adds alls sorts of stuff like pytest-cov
epytest -o addopts=
}
|