From 07517967de14d16de525f0fa11a2962fb2557466 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 May 2022 22:33:40 +0200 Subject: [PATCH] python310Packages.verboselogs: switch to pytestCheckHook --- .../python-modules/verboselogs/default.nix | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/verboselogs/default.nix b/pkgs/development/python-modules/verboselogs/default.nix index 99eb80530ef5..009dcd60edb0 100644 --- a/pkgs/development/python-modules/verboselogs/default.nix +++ b/pkgs/development/python-modules/verboselogs/default.nix @@ -1,21 +1,38 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pytest, mock }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "verboselogs"; version = "1.7"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "xolox"; repo = "python-verboselogs"; rev = version; - sha256 = "10jzm8pkl49as4y2zyiidmfqqj5zmqg3p73jvx4lfxi0gmp1vhl5"; + hash = "sha256-hcIdbn0gdkdJ33KcOx6uv0iMXW0x+i880SoROi+qX4I="; }; - # do not run pylint plugin test, as astroid is a old unsupported version - checkPhase = '' - PATH=$PATH:$out/bin pytest . -k "not test_pylint_plugin" - ''; - checkInputs = [ pytest mock ]; + checkInputs = [ + pytestCheckHook + mock + ]; + + pythonImportsCheck = [ + "verboselogs" + ]; + + disabledTests = [ + # Do not run pylint plugin test + "test_pylint_plugin" + ]; meta = with lib; { description = "Verbose logging for Python's logging module";