python3Packages.anonip: switch to pytestCheckHook
This commit is contained in:
parent
46eef09d3c
commit
5e895b728b
|
@ -1,8 +1,16 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, ipaddress, isPy27 }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "anonip";
|
||||
version = "1.1.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DigitaleGesellschaft";
|
||||
|
@ -11,14 +19,27 @@ buildPythonPackage rec {
|
|||
sha256 = "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = lib.optionals isPy27 [ ipaddress ];
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
checkPhase = "python tests.py";
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" ""
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [
|
||||
"tests.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"anonip"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool to anonymize IP addresses in log files";
|
||||
homepage = "https://github.com/DigitaleGesellschaft/Anonip";
|
||||
description = "A tool to anonymize IP-addresses in log-files";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.mmahut ];
|
||||
maintainers = with maintainers; [ mmahut ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue