depot/third_party/nixpkgs/pkgs/development/python-modules/aioesphomeapi/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

70 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# build-system
, cython_3
, setuptools
# dependencies
, aiohappyeyeballs
, async-timeout
, chacha20poly1305-reuseable
, noiseprotocol
, protobuf
, zeroconf
# tests
, mock
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "aioesphomeapi";
version = "21.0.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "esphome";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-HPnyFHHx1BahqzvRChT85BaG4eJM3qvTq2Tpbqb3SDI=";
};
nativeBuildInputs = [
setuptools
cython_3
];
propagatedBuildInputs = [
aiohappyeyeballs
chacha20poly1305-reuseable
noiseprotocol
protobuf
zeroconf
] ++ lib.optionals (pythonOlder "3.11") [
async-timeout
];
nativeCheckInputs = [
mock
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [
"aioesphomeapi"
];
meta = with lib; {
description = "Python Client for ESPHome native API";
homepage = "https://github.com/esphome/aioesphomeapi";
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab hexa ];
};
}