about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2024-01-15 10:58:27 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2024-01-15 10:58:27 +0100
commit23714a40562c555b97a42f1c0f05647d7323c84c (patch)
treee0c861b2cba926bf94d323eabb3fbf2f1d7c0c30
parent817c314ea6911512f61a21cc0cf8296e3b085145 (diff)
downloadnixlib-23714a40562c555b97a42f1c0f05647d7323c84c.tar
nixlib-23714a40562c555b97a42f1c0f05647d7323c84c.tar.gz
nixlib-23714a40562c555b97a42f1c0f05647d7323c84c.tar.bz2
nixlib-23714a40562c555b97a42f1c0f05647d7323c84c.tar.lz
nixlib-23714a40562c555b97a42f1c0f05647d7323c84c.tar.xz
nixlib-23714a40562c555b97a42f1c0f05647d7323c84c.tar.zst
nixlib-23714a40562c555b97a42f1c0f05647d7323c84c.zip
python311Packages.librouteros: refactor
-rw-r--r--pkgs/development/python-modules/librouteros/default.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/librouteros/default.nix b/pkgs/development/python-modules/librouteros/default.nix
index c59af697b5f5..1de2afd290a6 100644
--- a/pkgs/development/python-modules/librouteros/default.nix
+++ b/pkgs/development/python-modules/librouteros/default.nix
@@ -1,25 +1,30 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, isPy3k
-, pytestCheckHook
 , pytest-xdist
+, pytestCheckHook
+, pythonOlder
+, setuptools
 }:
 
 buildPythonPackage rec {
   pname = "librouteros";
   version = "3.2.1";
-  format = "setuptools";
+  pyproject = true;
 
-  disabled = !isPy3k;
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "luqasz";
-    repo = pname;
-    rev = version;
+    repo = "librouteros";
+    rev = "refs/tags/${version}";
     hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
   };
 
+  nativeBuildInputs = [
+    setuptools
+  ];
+
   nativeCheckInputs = [
     pytest-xdist
     pytestCheckHook
@@ -33,6 +38,8 @@ buildPythonPackage rec {
     "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 = [
@@ -42,6 +49,7 @@ buildPythonPackage rec {
   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 ];
   };