blob: 5bb2072b7117dc35fb311bcaba4c064dbb96b7ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-xdist
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "librouteros";
version = "3.2.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "luqasz";
repo = "librouteros";
rev = "refs/tags/${version}";
hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
};
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytest-xdist
pytestCheckHook
];
pytestFlagsArray = [
# pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
"-W" "ignore::pytest.PytestRemovedIn8Warning"
];
disabledTests = [
# Disable tests which require QEMU to run
"test_login"
"test_long_word"
"test_query"
"test_add_then_remove"
"test_add_then_update"
"test_generator_ditch"
# AttributeError: 'called_once_with' is not a valid assertion
"test_rawCmd_calls_writeSentence"
];
pythonImportsCheck = [
"librouteros"
];
meta = with lib; {
description = "Python implementation of the MikroTik RouterOS API";
homepage = "https://librouteros.readthedocs.io/";
changelog = "https://github.com/luqasz/librouteros/blob/${version}/CHANGELOG.rst";
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ fab ];
};
}
|