python3Packages.proton-vpn-api-core: init at 0.20.1-unstable-2023-10-10

This commit is contained in:
P. 2023-12-05 14:54:28 -06:00
parent 3b47001917
commit f63489a7f0
No known key found for this signature in database
GPG Key ID: 7B0FF33FF90110C7
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,66 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, proton-core
, proton-vpn-connection
, proton-vpn-logger
, proton-vpn-killswitch
, proton-vpn-session
, distro
, pytestCheckHook
}:
buildPythonPackage {
pname = "proton-vpn-api-core";
version = "0.20.1-unstable-2023-10-10";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-api-core";
rev = "9c03fc30d3ff08559cab3644eadde027b029375d";
hash = "sha256-vnz1+NazQceAs9KA3Jq0tsJditRoG/LoBR+0wuDzzHk=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
distro
proton-core
proton-vpn-connection
proton-vpn-logger
proton-vpn-killswitch
proton-vpn-session
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=proton/vpn/core/ --cov-report html --cov-report term" ""
'';
pythonImportsCheck = [ "proton.vpn.core" ];
nativeCheckInputs = [
pytestCheckHook
];
preCheck = ''
# Needed for Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
'';
disabledTestPaths = [
# Has a single test failing with Permission denied: '/run'
"tests/test_session.py"
];
meta = with lib; {
description = "Acts as a facade to the other Proton VPN components, exposing a uniform API to the available Proton VPN services";
homepage = "https://github.com/ProtonVPN/python-proton-vpn-api-core";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
};
}

View File

@ -9723,6 +9723,8 @@ self: super: with self; {
proton-core = callPackage ../development/python-modules/proton-core { };
proton-vpn-api-core = callPackage ../development/python-modules/proton-vpn-api-core { };
proton-vpn-connection = callPackage ../development/python-modules/proton-vpn-connection { };
proton-vpn-killswitch = callPackage ../development/python-modules/proton-vpn-killswitch { };