1{
2 lib,
3 aiohttp,
4 aioresponses,
5 awesomeversion,
6 buildPythonPackage,
7 envoy-utils,
8 fetchFromGitHub,
9 lxml,
10 orjson,
11 poetry-core,
12 pyjwt,
13 pytest-asyncio,
14 pytest-cov-stub,
15 pytest-timeout,
16 pytestCheckHook,
17 pythonOlder,
18 respx,
19 syrupy,
20 tenacity,
21}:
22
23buildPythonPackage rec {
24 pname = "pyenphase";
25 version = "2.3.1";
26 pyproject = true;
27
28 disabled = pythonOlder "3.11";
29
30 src = fetchFromGitHub {
31 owner = "pyenphase";
32 repo = "pyenphase";
33 tag = "v${version}";
34 hash = "sha256-Z6txaTkIkUTYWVWbsmvoI/huDTZKX5DxePqM5rsmIWY=";
35 };
36
37 pythonRelaxDeps = [ "tenacity" ];
38
39 build-system = [ poetry-core ];
40
41 dependencies = [
42 aiohttp
43 awesomeversion
44 envoy-utils
45 lxml
46 orjson
47 pyjwt
48 tenacity
49 ];
50
51 nativeCheckInputs = [
52 aioresponses
53 pytest-asyncio
54 pytest-cov-stub
55 pytest-timeout
56 pytestCheckHook
57 respx
58 syrupy
59 ];
60
61 disabledTestPaths = [
62 # Tests need network access
63 "tests/test_retries.py"
64 ];
65
66 pythonImportsCheck = [ "pyenphase" ];
67
68 meta = with lib; {
69 description = "Library to control enphase envoy";
70 homepage = "https://github.com/pyenphase/pyenphase";
71 changelog = "https://github.com/pyenphase/pyenphase/blob/${src.tag}/CHANGELOG.md";
72 license = licenses.mit;
73 maintainers = with maintainers; [ fab ];
74 };
75}