blob: 78eb8b41581a2bdf02d98758d6d63908dd549183 (
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
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} )
inherit distutils-r1 linux-info
DESCRIPTION="Proton VPN Network Manager handler"
HOMEPAGE="https://github.com/ProtonVPN/python-proton-vpn-network-manager"
SRC_URI="https://github.com/ProtonVPN/python-proton-vpn-network-manager/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/python-${P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="test? ( dev-python/pytest-asyncio[${PYTHON_USEDEP}] )"
RDEPEND="
dev-python/jinja2[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/proton-core[${PYTHON_USEDEP}]
>=dev-python/proton-vpn-api-core-0.45.1[${PYTHON_USEDEP}]
>=dev-python/proton-vpn-local-agent-1.4.4[${PYTHON_USEDEP}]
dev-python/pygobject[${PYTHON_USEDEP}]
net-misc/networkmanager[introspection]
net-vpn/networkmanager-openvpn
"
CONFIG_CHECK="~DUMMY ~WIREGUARD"
PATCHES=(
"${FILESDIR}/${PN}-0.12.13-fix-networkmanager-plugin-loading.patch"
"${FILESDIR}/${PN}-0.12.13-remove-call-to-apt.patch"
)
distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
sed -i "/--cov/d" setup.cfg || die
}
python_test() {
# VPN connection cannot be tested within sandbox
local EPYTEST_IGNORE=(
tests/unit/core/test_networkmanager.py
tests/unit/wireguard/test_wireguard.py
)
XDG_RUNTIME_DIR="${T}/python_test" epytest
}
|