python3Packages.pysnooper: disable on older Python releases

- switch to pytestCheckHook
- add pythonImportsCheck
This commit is contained in:
Fabian Affolter 2022-04-03 09:27:41 +02:00 committed by GitHub
parent 6fb4383ad4
commit f3aa17de86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,25 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, isPy27
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
version = "1.1.1";
pname = "pysnooper";
version = "1.1.1";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit version;
pname = "PySnooper";
sha256 = "sha256-0X3JHMoVk8ECMNzkXkax0/8PiRDww46UHt9roSYLOCA=";
hash = "sha256-0X3JHMoVk8ECMNzkXkax0/8PiRDww46UHt9roSYLOCA=";
};
# test dependency python-toolbox fails with py27
doCheck = !isPy27;
checkInputs = [
pytest
pytestCheckHook
];
pythonImportsCheck = [
"pysnooper"
];
meta = with lib; {