2021-07-01 18:29:59 +02:00
|
|
|
{
|
|
|
|
lib,
|
2023-12-14 16:34:43 +01:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
2024-03-24 03:25:37 +01:00
|
|
|
cython,
|
2023-12-14 16:34:43 +01:00
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# dependencies
|
2023-12-13 23:36:39 +01:00
|
|
|
aiohappyeyeballs,
|
2024-03-07 01:02:51 +01:00
|
|
|
async-interrupt,
|
2023-04-11 13:51:51 +02:00
|
|
|
async-timeout,
|
2023-07-05 22:41:58 +02:00
|
|
|
chacha20poly1305-reuseable,
|
2024-03-07 01:02:51 +01:00
|
|
|
cryptography,
|
2021-09-09 20:02:36 +02:00
|
|
|
noiseprotocol,
|
2021-07-01 18:29:59 +02:00
|
|
|
protobuf,
|
2023-12-14 16:34:43 +01:00
|
|
|
zeroconf,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
mock,
|
2021-07-27 14:23:35 +02:00
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2021-07-01 18:29:59 +02:00
|
|
|
}:
|
2019-04-01 17:25:50 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioesphomeapi";
|
2025-02-28 00:51:42 +01:00
|
|
|
version = "29.3.1";
|
2023-10-28 13:04:06 +02:00
|
|
|
pyproject = true;
|
2019-04-22 23:35:37 +02:00
|
|
|
|
2022-09-30 14:45:17 +02:00
|
|
|
disabled = pythonOlder "3.9";
|
2019-04-01 17:25:50 +02:00
|
|
|
|
2021-07-27 14:23:35 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esphome";
|
2024-03-26 07:53:28 -07:00
|
|
|
repo = "aioesphomeapi";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2025-02-28 00:51:42 +01:00
|
|
|
hash = "sha256-Gv3uM3ZKxcU5BA8HfzHJqTEODM8sfcKbLGfk96yb8u4=";
|
2019-04-01 17:25:50 +02:00
|
|
|
};
|
|
|
|
|
2024-03-26 07:53:28 -07:00
|
|
|
build-system = [
|
2023-10-28 13:04:06 +02:00
|
|
|
setuptools
|
2024-03-24 03:25:37 +01:00
|
|
|
cython
|
2023-10-28 13:04:06 +02:00
|
|
|
];
|
|
|
|
|
2024-08-07 12:21:41 +02:00
|
|
|
pythonRelaxDeps = [ "cryptography" ];
|
|
|
|
|
2024-03-26 07:53:28 -07:00
|
|
|
dependencies = [
|
2023-12-13 23:36:39 +01:00
|
|
|
aiohappyeyeballs
|
2024-03-07 01:02:51 +01:00
|
|
|
async-interrupt
|
2023-07-05 22:41:58 +02:00
|
|
|
chacha20poly1305-reuseable
|
2024-03-07 01:02:51 +01:00
|
|
|
cryptography
|
2021-09-09 20:02:36 +02:00
|
|
|
noiseprotocol
|
2023-05-01 10:09:47 +02:00
|
|
|
protobuf
|
2021-07-01 18:29:59 +02:00
|
|
|
zeroconf
|
2023-10-28 13:04:06 +02:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
|
2019-04-01 17:25:50 +02:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-27 14:23:35 +02:00
|
|
|
mock
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2019-04-04 08:47:11 +02:00
|
|
|
|
2024-11-06 20:52:52 +01:00
|
|
|
disabledTestPaths = [
|
|
|
|
# benchmarking requires pytest-codespeed
|
2025-02-18 03:04:36 +01:00
|
|
|
"tests/benchmarks"
|
2024-11-06 20:52:52 +01:00
|
|
|
];
|
|
|
|
|
2025-02-19 16:05:38 +01:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-12-13 23:36:39 +01:00
|
|
|
pythonImportsCheck = [ "aioesphomeapi" ];
|
|
|
|
|
2019-04-04 08:47:11 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Client for ESPHome native API";
|
2019-09-15 17:21:04 +02:00
|
|
|
homepage = "https://github.com/esphome/aioesphomeapi";
|
2025-01-19 21:14:05 +01:00
|
|
|
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/${src.tag}";
|
2019-04-04 08:47:11 +02:00
|
|
|
license = licenses.mit;
|
2021-05-04 14:32:37 +02:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
fab
|
|
|
|
hexa
|
|
|
|
];
|
2019-04-04 08:47:11 +02:00
|
|
|
};
|
2019-04-01 17:25:50 +02:00
|
|
|
}
|