summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-03-16 09:12:58 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-03-16 12:58:41 +0100
commit1b6bac8a80cd2fe8e1238b7185c4b656663db9f9 (patch)
treeed9744d2a4ee4f7f52e2deeeda4741f13b48bbf3 /pkgs
parent5b72839b7981aebdf9b09c4f012cf640ca60b9e9 (diff)
downloadnixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.tar
nixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.tar.gz
nixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.tar.bz2
nixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.tar.lz
nixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.tar.xz
nixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.tar.zst
nixpkgs-1b6bac8a80cd2fe8e1238b7185c4b656663db9f9.zip
python3Packages.brother: 0.2.1 -> 0.2.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/brother/default.nix36
1 files changed, 23 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/brother/default.nix b/pkgs/development/python-modules/brother/default.nix
index 3e86aac02f1..e4f9d63bd6b 100644
--- a/pkgs/development/python-modules/brother/default.nix
+++ b/pkgs/development/python-modules/brother/default.nix
@@ -1,25 +1,33 @@
-{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
 , pysnmp
-, asynctest, pytestcov, pytestrunner, pytest-asyncio, pytest-trio, pytest-tornasync }:
+, pytest-asyncio
+, pytest-error-for-skips
+, pytest-runner
+, pytest-tornasync
+, pytest-trio
+, pytestCheckHook
+, pythonOlder
+}:
 
 buildPythonPackage rec {
   pname = "brother";
-  version = "0.2.1";
+  version = "0.2.2";
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "bieniu";
     repo = pname;
     rev = version;
-    sha256 = "sha256-yOloGkOVhXcTt0PAjf3yWUItN1okO94DndRFsImiuz4=";
+    sha256 = "sha256-vIefcL3K3ZbAUxMFM7gbbTFdrnmufWZHcq4OA19SYXE=";
   };
 
-  # pytest-error-for-skips is not packaged
   postPatch = ''
     substituteInPlace pytest.ini \
-      --replace " --error-for-skips" ""
-    substituteInPlace setup.py \
-      --replace "\"pytest-error-for-skips\"" ""
+      --replace "--cov --cov-report term-missing " ""
+    substituteInPlace requirements-test.txt \
+      --replace "pytest-cov" ""
   '';
 
   propagatedBuildInputs = [
@@ -27,16 +35,18 @@ buildPythonPackage rec {
   ];
 
   checkInputs = [
-    asynctest
-    pytestcov
-    pytestrunner
     pytest-asyncio
-    pytest-trio
+    pytest-error-for-skips
+    pytest-runner
     pytest-tornasync
+    pytest-trio
+    pytestCheckHook
   ];
 
+  pythonImportsCheck = [ "brother" ];
+
   meta = with lib; {
-    description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP.";
+    description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP";
     homepage = "https://github.com/bieniu/brother";
     license = licenses.asl20;
     maintainers = with maintainers; [ hexa ];