depot/third_party/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

64 lines
1.3 KiB
Nix

{ lib
, aiohttp
, asynctest
, buildPythonPackage
, click
, fetchFromGitHub
, mock
, prompt_toolkit
, pygments
, pyserial
, pyserial-asyncio
, pytestCheckHook
, redis
, sqlalchemy
, tornado
, twisted
}:
buildPythonPackage rec {
pname = "pymodbus";
version = "2.5.2";
src = fetchFromGitHub {
owner = "riptideio";
repo = pname;
rev = "v${version}";
sha256 = "sha256-jqVfBAjIdRBB5AYd0ZkMi7qAUR6vSYeBI4OYEv+mKwE=";
};
# Twisted asynchronous version is not supported due to a missing dependency
propagatedBuildInputs = [
aiohttp
click
prompt_toolkit
pygments
pyserial
pyserial-asyncio
tornado
];
checkInputs = [
asynctest
mock
pytestCheckHook
redis
sqlalchemy
twisted
];
pythonImportsCheck = [ "pymodbus" ];
meta = with lib; {
description = "Python implementation of the Modbus protocol";
longDescription = ''
Pymodbus is a full Modbus protocol implementation using twisted,
torndo or asyncio for its asynchronous communications core. It can
also be used without any third party dependencies if a more
lightweight project is needed.
'';
homepage = "https://github.com/riptideio/pymodbus";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}