lol

python3Packages.anonip: switch to pytestCheckHook

authored by

Fabian Affolter and committed by
Martin Weinelt
5e895b72 46eef09d

+26 -5
+26 -5
pkgs/development/python-modules/anonip/default.nix
··· 1 - { lib, buildPythonPackage, fetchFromGitHub, ipaddress, isPy27 }: 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pytestCheckHook 5 + , pythonOlder 6 + }: 2 7 3 8 buildPythonPackage rec { 4 9 pname = "anonip"; 5 10 version = "1.1.0"; 11 + format = "setuptools"; 12 + 13 + disabled = pythonOlder "3.7"; 6 14 7 15 src = fetchFromGitHub { 8 16 owner = "DigitaleGesellschaft"; ··· 11 19 sha256 = "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc"; 12 20 }; 13 21 14 - propagatedBuildInputs = lib.optionals isPy27 [ ipaddress ]; 22 + checkInputs = [ 23 + pytestCheckHook 24 + ]; 25 + 26 + postPatch = '' 27 + substituteInPlace setup.cfg \ 28 + --replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" "" 29 + ''; 15 30 16 - checkPhase = "python tests.py"; 31 + pytestFlagsArray = [ 32 + "tests.py" 33 + ]; 34 + 35 + pythonImportsCheck = [ 36 + "anonip" 37 + ]; 17 38 18 39 meta = with lib; { 40 + description = "Tool to anonymize IP addresses in log files"; 19 41 homepage = "https://github.com/DigitaleGesellschaft/Anonip"; 20 - description = "A tool to anonymize IP-addresses in log-files"; 21 42 license = licenses.bsd3; 22 - maintainers = [ maintainers.mmahut ]; 43 + maintainers = with maintainers; [ mmahut ]; 23 44 }; 24 45 }