python3Packages.schema: switch to pytestCheckHook

This commit is contained in:
Fabian Affolter 2022-01-13 13:25:41 +01:00
parent b014866de5
commit d76a2e5929

View file

@ -1,28 +1,41 @@
{ lib, buildPythonPackage, fetchPypi, contextlib2, pytest, mock }: { lib
, buildPythonPackage
, contextlib2
, fetchPypi
, mock
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "schema"; pname = "schema";
version = "0.7.5"; version = "0.7.5";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "f06717112c61895cabc4707752b88716e8420a8819d71404501e114f91043197"; hash = "sha256-8GcXESxhiVyrxHB3UriHFuhCCogZ1xQEUB4RT5EEMZc=";
}; };
preConfigure = '' propagatedBuildInputs = [
substituteInPlace requirements.txt --replace '==' '>=' contextlib2
''; ];
propagatedBuildInputs = [ contextlib2 ]; checkInputs = [
mock
pytestCheckHook
];
checkInputs = [ pytest mock ]; pythonImportsCheck = [
checkPhase = "pytest ./test_schema.py"; "schema"
];
meta = with lib; { meta = with lib; {
description = "Library for validating Python data structures"; description = "Library for validating Python data structures";
homepage = "https://github.com/keleshev/schema"; homepage = "https://github.com/keleshev/schema";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.tobim ]; maintainers = with maintainers; [ tobim ];
}; };
} }