diff --git a/pkgs/development/python-modules/pymodbus-repl/default.nix b/pkgs/development/python-modules/pymodbus-repl/default.nix new file mode 100644 index 000000000000..be7d58e3a980 --- /dev/null +++ b/pkgs/development/python-modules/pymodbus-repl/default.nix @@ -0,0 +1,66 @@ +{ + aiohttp, + buildPythonPackage, + doCheck ? false, # cyclic dependency with pymodbus + fetchFromGitHub, + lib, + poetry-core, + prompt-toolkit, + pygments, + pymodbus, + pymodbus-repl, + pytest-cov-stub, + pytestCheckHook, + tabulate, + typer, +}: + +buildPythonPackage rec { + pname = "pymodbus-repl"; + version = "2.0.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pymodbus-dev"; + repo = "repl"; + tag = version; + hash = "sha256-jGoYp2nDWMWMX8n0aaG/YP+rQcj2npFbhdy7T1qxByc="; + }; + + build-system = [ poetry-core ]; + + pythonRelaxDeps = [ + "typer" + ]; + + dependencies = [ + aiohttp + prompt-toolkit + pygments + tabulate + typer + ]; + + pythonImportsCheck = [ "pymodbus_repl" ]; + + inherit doCheck; + + nativeCheckInputs = [ + pymodbus + pytest-cov-stub + pytestCheckHook + ]; + + passthru.tests = { + # currently expected to fail: https://github.com/pymodbus-dev/repl/pull/26 + pytest = pymodbus-repl.override { doCheck = true; }; + }; + + meta = { + changelog = "https://github.com/pymodbus-dev/repl/releases/tag/${src.tag}"; + description = "REPL client and server for pymodbus"; + homepage = "https://github.com/pymodbus-dev/repl"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/pymodbus/default.nix b/pkgs/development/python-modules/pymodbus/default.nix index 25c768fb9def..a776ccd96aa9 100644 --- a/pkgs/development/python-modules/pymodbus/default.nix +++ b/pkgs/development/python-modules/pymodbus/default.nix @@ -6,12 +6,12 @@ fetchFromGitHub, prompt-toolkit, pygments, + pymodbus-repl, pyserial, pytest-asyncio, pytest-cov-stub, pytest-xdist, pytestCheckHook, - pythonOlder, redis, setuptools, sqlalchemy, @@ -21,29 +21,22 @@ buildPythonPackage rec { pname = "pymodbus"; - version = "3.9.0"; + version = "3.9.1"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "pymodbus-dev"; repo = "pymodbus"; tag = "v${version}"; - hash = "sha256-8v48+wnxVBIXJhCn7/oHyoxPN8smWWNY/i5LMHhKUVk="; + hash = "sha256-O64r8/3AGZYr449FANo3wQCUiIJkIjN5eQ+VoTrvUHo="; }; build-system = [ setuptools ]; optional-dependencies = { - repl = [ - aiohttp - typer - prompt-toolkit - pygments - click - ]; + repl = [ pymodbus-repl ]; serial = [ pyserial ]; + simulator = [ aiohttp ]; }; nativeCheckInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 157017e1e937..e3098c7fc424 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12664,6 +12664,8 @@ self: super: with self; { pymodbus = callPackage ../development/python-modules/pymodbus { }; + pymodbus-repl = callPackage ../development/python-modules/pymodbus-repl { }; + pymodes = callPackage ../development/python-modules/pymodes { }; pymonctl = callPackage ../development/python-modules/pymonctl { };