2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-xdist,
|
|
|
|
pytest7CheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2021-02-19 19:06:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "librouteros";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "3.2.1";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luqasz";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "librouteros";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-19 19:06:45 +00:00
|
|
|
pytest-xdist
|
2024-04-21 15:54:59 +00:00
|
|
|
pytest7CheckHook
|
2021-02-19 19:06:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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"
|
2024-01-25 14:12:00 +00:00
|
|
|
# AttributeError: 'called_once_with' is not a valid assertion
|
|
|
|
"test_rawCmd_calls_writeSentence"
|
2021-02-19 19:06:45 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "librouteros" ];
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python implementation of the MikroTik RouterOS API";
|
|
|
|
homepage = "https://librouteros.readthedocs.io/";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/luqasz/librouteros/blob/${version}/CHANGELOG.rst";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = with licenses; [ gpl2Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|