otadump: init at 0.1.2 (#329129)
[NixPkgs.git] / pkgs / development / python-modules / aioesphomeapi / default.nix
blobc682fde87681a4b08dcae48c099d8b0f90507551
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
7   # build-system
8   cython,
9   setuptools,
11   # dependencies
12   aiohappyeyeballs,
13   async-interrupt,
14   async-timeout,
15   chacha20poly1305-reuseable,
16   cryptography,
17   noiseprotocol,
18   protobuf,
19   zeroconf,
21   # tests
22   mock,
23   pytest-asyncio,
24   pytestCheckHook,
27 buildPythonPackage rec {
28   pname = "aioesphomeapi";
29   version = "28.0.0";
30   pyproject = true;
32   disabled = pythonOlder "3.9";
34   src = fetchFromGitHub {
35     owner = "esphome";
36     repo = "aioesphomeapi";
37     rev = "refs/tags/v${version}";
38     hash = "sha256-vMqDxg2BV9/g5FquejnT/Rsvwjhdh01K2LxiT355p1U=";
39   };
41   build-system = [
42     setuptools
43     cython
44   ];
46   pythonRelaxDeps = [ "cryptography" ];
48   dependencies = [
49     aiohappyeyeballs
50     async-interrupt
51     chacha20poly1305-reuseable
52     cryptography
53     noiseprotocol
54     protobuf
55     zeroconf
56   ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
58   nativeCheckInputs = [
59     mock
60     pytest-asyncio
61     pytestCheckHook
62   ];
64   disabledTests = [
65     # https://github.com/esphome/aioesphomeapi/issues/837
66     "test_reconnect_logic_stop_callback"
67     # python3.12.4 regression
68     # https://github.com/esphome/aioesphomeapi/issues/889
69     "test_start_connection_cannot_increase_recv_buffer"
70     "test_start_connection_can_only_increase_buffer_size_to_262144"
71   ];
73   disabledTestPaths = [
74     # benchmarking requires pytest-codespeed
75     "tests/test_bluetooth_benchmarks.py"
76   ];
78   pythonImportsCheck = [ "aioesphomeapi" ];
80   meta = with lib; {
81     description = "Python Client for ESPHome native API";
82     homepage = "https://github.com/esphome/aioesphomeapi";
83     changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
84     license = licenses.mit;
85     maintainers = with maintainers; [
86       fab
87       hexa
88     ];
89   };