depot/third_party/nixpkgs/pkgs/development/python-modules/aioesphomeapi/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

85 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
cython,
setuptools,
# dependencies
aiohappyeyeballs,
async-interrupt,
async-timeout,
chacha20poly1305-reuseable,
cryptography,
noiseprotocol,
protobuf,
zeroconf,
# tests
mock,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "aioesphomeapi";
version = "27.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "esphome";
repo = "aioesphomeapi";
rev = "refs/tags/v${version}";
hash = "sha256-2FA0QleMJG69vhyC85tO4ZAY0U8qPIdyJROHKxC35GM=";
};
build-system = [
setuptools
cython
];
pythonRelaxDeps = [ "cryptography" ];
dependencies = [
aiohappyeyeballs
async-interrupt
chacha20poly1305-reuseable
cryptography
noiseprotocol
protobuf
zeroconf
] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
nativeCheckInputs = [
mock
pytest-asyncio
pytestCheckHook
];
disabledTests = [
# https://github.com/esphome/aioesphomeapi/issues/837
"test_reconnect_logic_stop_callback"
# python3.12.4 regression
# https://github.com/esphome/aioesphomeapi/issues/889
"test_start_connection_cannot_increase_recv_buffer"
"test_start_connection_can_only_increase_buffer_size_to_262144"
];
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
];
};
}