about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-04-03 09:27:41 +0200
committerGitHub <noreply@github.com>2022-04-03 09:27:41 +0200
commitf3aa17de86033e1906c05a43c89e089a2326e9fc (patch)
tree968b3c2fcaca93b4baae7fac391493e4a100af1b /pkgs
parent6fb4383ad48c2d627e82298ec5eea7fa048900a9 (diff)
downloadnixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.tar
nixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.tar.gz
nixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.tar.bz2
nixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.tar.lz
nixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.tar.xz
nixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.tar.zst
nixlib-f3aa17de86033e1906c05a43c89e089a2326e9fc.zip
python3Packages.pysnooper: disable on older Python releases
- switch to pytestCheckHook
- add pythonImportsCheck
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pysnooper/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/pysnooper/default.nix b/pkgs/development/python-modules/pysnooper/default.nix
index f09f81f6da3b..370ed373da55 100644
--- a/pkgs/development/python-modules/pysnooper/default.nix
+++ b/pkgs/development/python-modules/pysnooper/default.nix
@@ -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; {