2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
2024-01-13 08:15:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
2024-01-02 11:29:13 +00:00
|
|
|
, aiohappyeyeballs
|
2024-04-21 15:54:59 +00:00
|
|
|
, async-interrupt
|
2023-04-12 12:48:02 +00:00
|
|
|
, async-timeout
|
2023-07-15 17:15:38 +00:00
|
|
|
, chacha20poly1305-reuseable
|
2024-04-21 15:54:59 +00:00
|
|
|
, cryptography
|
2021-09-18 10:52:07 +00:00
|
|
|
, noiseprotocol
|
2021-07-24 12:14:16 +00:00
|
|
|
, protobuf
|
2024-01-13 08:15:51 +00:00
|
|
|
, zeroconf
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, mock
|
2021-08-05 21:33:18 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioesphomeapi";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "24.3.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esphome";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "aioesphomeapi";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-wQR3dwN5O++TdtQh+Wcj7c7TNMaRj2lMlOuXOAPVU0Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2023-11-16 04:20:00 +00:00
|
|
|
setuptools
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
aiohappyeyeballs
|
2024-04-21 15:54:59 +00:00
|
|
|
async-interrupt
|
2023-07-15 17:15:38 +00:00
|
|
|
chacha20poly1305-reuseable
|
2024-04-21 15:54:59 +00:00
|
|
|
cryptography
|
2021-09-18 10:52:07 +00:00
|
|
|
noiseprotocol
|
2023-05-24 13:37:59 +00:00
|
|
|
protobuf
|
2021-07-24 12:14:16 +00:00
|
|
|
zeroconf
|
2023-11-16 04:20:00 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
async-timeout
|
2021-07-24 12:14:16 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-05 21:33:18 +00:00
|
|
|
mock
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/esphome/aioesphomeapi/issues/837
|
|
|
|
"test_reconnect_logic_stop_callback"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioesphomeapi"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Client for ESPHome native API";
|
|
|
|
homepage = "https://github.com/esphome/aioesphomeapi";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-05-04 21:07:42 +00:00
|
|
|
maintainers = with maintainers; [ fab hexa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|