Merge pull request #281098 from fabaff/librouteros-fix
python311Packages.librouteros: refactor
This commit is contained in:
commit
725c164488
@ -1,25 +1,30 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, isPy3k
|
|
||||||
, pytestCheckHook
|
|
||||||
, pytest-xdist
|
, pytest-xdist
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, setuptools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "librouteros";
|
pname = "librouteros";
|
||||||
version = "3.2.1";
|
version = "3.2.1";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
disabled = !isPy3k;
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "luqasz";
|
owner = "luqasz";
|
||||||
repo = pname;
|
repo = "librouteros";
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
|
hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
@ -33,6 +38,8 @@ buildPythonPackage rec {
|
|||||||
"test_add_then_remove"
|
"test_add_then_remove"
|
||||||
"test_add_then_update"
|
"test_add_then_update"
|
||||||
"test_generator_ditch"
|
"test_generator_ditch"
|
||||||
|
# AttributeError: 'called_once_with' is not a valid assertion
|
||||||
|
"test_rawCmd_calls_writeSentence"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
@ -42,6 +49,7 @@ buildPythonPackage rec {
|
|||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Python implementation of the MikroTik RouterOS API";
|
description = "Python implementation of the MikroTik RouterOS API";
|
||||||
homepage = "https://librouteros.readthedocs.io/";
|
homepage = "https://librouteros.readthedocs.io/";
|
||||||
|
changelog = "https://github.com/luqasz/librouteros/blob/${version}/CHANGELOG.rst";
|
||||||
license = with licenses; [ gpl2Only ];
|
license = with licenses; [ gpl2Only ];
|
||||||
maintainers = with maintainers; [ fab ];
|
maintainers = with maintainers; [ fab ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user