python3Packages.python-vipaccess: fix build (#448410)

This commit is contained in:
Gaétan Lepage
2025-10-11 22:52:54 +00:00
committed by GitHub

View File

@@ -5,7 +5,7 @@
oath, oath,
pycryptodome, pycryptodome,
requests, requests,
pytest, pytestCheckHook,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@@ -24,20 +24,31 @@ buildPythonPackage rec {
requests requests
]; ];
nativeCheckInputs = [ pytest ]; # unittest based tests using yield, imcompatible with pytest
# test_check_token_detects_valid_hotp_token, # test_check_token_detects_valid_hotp_token,
# test_check_token_detects_valid_totp_token and # test_check_token_detects_valid_totp_token and
# test_check_token_detects_invlaid_token require network postPatch = ''
checkPhase = '' substituteInPlace tests/test_utils.py \
mv vipaccess vipaccess.hidden --replace-fail "test_check_TOTP_token_models" "check_TOTP_token_models" \
pytest tests/ -k 'not test_check_token' --replace-fail "test_check_HOTP_token_models" "check_HOTP_token_models"
''; '';
meta = with lib; { nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
rm -rf vipaccess
'';
disabledTests = [
# cannot read vipaccess/version.py since we moved it away
"test_check_token_detects_invalid_token"
];
meta = {
description = "Free software implementation of Symantec's VIP Access application and protocol"; description = "Free software implementation of Symantec's VIP Access application and protocol";
mainProgram = "vipaccess"; mainProgram = "vipaccess";
homepage = "https://github.com/dlenski/python-vipaccess"; homepage = "https://github.com/dlenski/python-vipaccess";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ aw ]; maintainers = with lib.maintainers; [ aw ];
}; };
} }