@@ -1,25 +1,33 @@
1−{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
24, pysnmp
3−, asynctest, pytestcov, pytestrunner, pytest-asyncio, pytest-trio, pytest-tornasync }:
5+, pytest-asyncio
6+, pytest-error-for-skips
7+, pytest-runner
8+, pytest-tornasync
9+, pytest-trio
10+, pytestCheckHook
11+, pythonOlder
12+}:
413
514buildPythonPackage rec {
615 pname = "brother";
7− version = "0.2.1";
16+ version = "0.2.2";
817 disabled = pythonOlder "3.8";
918
1019 src = fetchFromGitHub {
1120 owner = "bieniu";
1221 repo = pname;
1322 rev = version;
14− sha256 = "sha256-yOloGkOVhXcTt0PAjf3yWUItN1okO94DndRFsImiuz4=";
23+ sha256 = "sha256-vIefcL3K3ZbAUxMFM7gbbTFdrnmufWZHcq4OA19SYXE=";
1524 };
1625
17− # pytest-error-for-skips is not packaged
1826 postPatch = ''
1927 substituteInPlace pytest.ini \
20− --replace " --error-for-skips" ""
21− substituteInPlace setup.py \
22− --replace "\"pytest-error-for-skips\"" ""
28+ --replace "--cov --cov-report term-missing " ""
29+ substituteInPlace requirements-test.txt \
30+ --replace "pytest-cov" ""
2331 '';
2432
2533 propagatedBuildInputs = [
@@ -27,16 +35,18 @@ buildPythonPackage rec {
2735 ];
2836
2937 checkInputs = [
30− asynctest
31− pytestcov
32− pytestrunner
3338 pytest-asyncio
34− pytest-trio
39+ pytest-error-for-skips
40+ pytest-runner
3541 pytest-tornasync
42+ pytest-trio
43+ pytestCheckHook
3644 ];
3745
46+ pythonImportsCheck = [ "brother" ];
47+
3848 meta = with lib; {
39− description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP.";
49+ description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP";
4050 homepage = "https://github.com/bieniu/brother";
4151 license = licenses.asl20;
4252 maintainers = with maintainers; [ hexa ];