diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2022-01-15 09:12:19 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-01-23 01:09:30 +0100 |
commit | 5e895b728ba2faa555d6fd705be0faa9f2012d56 (patch) | |
tree | ea7766cc22ff402c00dba3cb983912e9759c91a3 /pkgs/development/python-modules/anonip | |
parent | 46eef09d3ca6ca0cba4a4888c0a67c951b7aaa83 (diff) | |
download | nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.tar nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.tar.gz nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.tar.bz2 nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.tar.lz nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.tar.xz nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.tar.zst nixpkgs-5e895b728ba2faa555d6fd705be0faa9f2012d56.zip |
python3Packages.anonip: switch to pytestCheckHook
Diffstat (limited to 'pkgs/development/python-modules/anonip')
-rw-r--r-- | pkgs/development/python-modules/anonip/default.nix | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/anonip/default.nix b/pkgs/development/python-modules/anonip/default.nix index 45a61a12bb0..96115aaee43 100644 --- a/pkgs/development/python-modules/anonip/default.nix +++ b/pkgs/development/python-modules/anonip/default.nix @@ -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 + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" "" + ''; + + pytestFlagsArray = [ + "tests.py" + ]; - checkPhase = "python 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 ]; }; } |