about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pymodbus/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pymodbus/default.nix43
1 files changed, 23 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix b/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix
index c1b1b75d284c..d4715c131cea 100644
--- a/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix
@@ -7,54 +7,57 @@
 , prompt-toolkit
 , pygments
 , pyserial
-, pyserial-asyncio
 , pytest-asyncio
-, pytest-rerunfailures
 , pytest-xdist
 , pytestCheckHook
 , redis
 , sqlalchemy
-, tornado
 , twisted
+, typer
 }:
 
 buildPythonPackage rec {
   pname = "pymodbus";
-  version = "3.3.2";
+  version = "3.5.0";
   format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "pymodbus-dev";
     repo = pname;
     rev = "refs/tags/v${version}";
-    hash = "sha256-EGJyb0AVLKN7FEoeWF4rVqmJBNbXHent9P+cxc13rQs=";
+    hash = "sha256-ZoGpMhJng46nW7v/QgjGCsFZV6xV4PSh9/DH1d2dzdg=";
   };
 
-  # Twisted asynchronous version is not supported due to a missing dependency
-  propagatedBuildInputs = [
-    aiohttp
-    click
-    prompt-toolkit
-    pygments
-    pyserial
-    pyserial-asyncio
-    tornado
-  ];
+  passthru.optional-dependencies = {
+    repl = [
+      aiohttp
+      typer
+      prompt-toolkit
+      pygments
+      click
+    ] ++ typer.optional-dependencies.all;
+    serial = [
+      pyserial
+    ];
+  };
 
   nativeCheckInputs = [
     mock
     pytest-asyncio
-    pytest-rerunfailures
     pytest-xdist
     pytestCheckHook
     redis
     sqlalchemy
     twisted
-  ];
+  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
+
+  preCheck = ''
+    pushd test
+  '';
 
-  pytestFlagsArray = [
-    "--reruns" "3" # Racy socket tests
-  ];
+  postCheck = ''
+    popd
+  '';
 
   pythonImportsCheck = [ "pymodbus" ];