Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / librouteros / default.nix
blob5ba5f86aab10b739e8eaa4706fdd4f87b313d86d
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytest-xdist
5 , pytest7CheckHook
6 , pythonOlder
7 , setuptools
8 }:
10 buildPythonPackage rec {
11   pname = "librouteros";
12   version = "3.2.1";
13   pyproject = true;
15   disabled = pythonOlder "3.8";
17   src = fetchFromGitHub {
18     owner = "luqasz";
19     repo = "librouteros";
20     rev = "refs/tags/${version}";
21     hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
22   };
24   nativeBuildInputs = [
25     setuptools
26   ];
28   nativeCheckInputs = [
29     pytest-xdist
30     pytest7CheckHook
31   ];
33   disabledTests = [
34     # Disable tests which require QEMU to run
35     "test_login"
36     "test_long_word"
37     "test_query"
38     "test_add_then_remove"
39     "test_add_then_update"
40     "test_generator_ditch"
41     # AttributeError: 'called_once_with' is not a valid assertion
42     "test_rawCmd_calls_writeSentence"
43   ];
45   pythonImportsCheck = [
46     "librouteros"
47   ];
49   meta = with lib; {
50     description = "Python implementation of the MikroTik RouterOS API";
51     homepage = "https://librouteros.readthedocs.io/";
52     changelog = "https://github.com/luqasz/librouteros/blob/${version}/CHANGELOG.rst";
53     license = with licenses; [ gpl2Only ];
54     maintainers = with maintainers; [ fab ];
55   };