depot/third_party/nixpkgs/pkgs/development/python-modules/pymodbus/default.nix
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

74 lines
1.6 KiB
Nix

{ lib
, aiohttp
, buildPythonPackage
, click
, fetchFromGitHub
, mock
, prompt-toolkit
, pygments
, pyserial
, pyserial-asyncio
, pytest-asyncio
, pytest-rerunfailures
, pytest-xdist
, pytestCheckHook
, redis
, sqlalchemy
, tornado
, twisted
}:
buildPythonPackage rec {
pname = "pymodbus";
version = "3.1.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "pymodbus-dev";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-GHyDlt046v4KP9KQRnXH6F+3ikoCjbhVHEQuSdm99a8=";
};
# Twisted asynchronous version is not supported due to a missing dependency
propagatedBuildInputs = [
aiohttp
click
prompt-toolkit
pygments
pyserial
pyserial-asyncio
tornado
];
nativeCheckInputs = [
mock
pytest-asyncio
pytest-rerunfailures
pytest-xdist
pytestCheckHook
redis
sqlalchemy
twisted
];
pytestFlagsArray = [
"--reruns" "3" # Racy socket tests
];
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/pymodbus-dev/pymodbus";
changelog = "https://github.com/pymodbus-dev/pymodbus/releases/tag/v${version}";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}