1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 orjson,
8 pytest-aiohttp,
9 pytest-cov-stub,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "pydeconz";
17 version = "120";
18 pyproject = true;
19
20 disabled = pythonOlder "3.12";
21
22 src = fetchFromGitHub {
23 owner = "Kane610";
24 repo = "deconz";
25 tag = "v${version}";
26 hash = "sha256-L9v6j8CFc19TlcFBTm3YCQG1nS78uIUfERB6mfwzMNM=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace-fail "setuptools==77.0.3" "setuptools" \
32 --replace-fail "wheel==" "wheel>="
33 '';
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 aiohttp
39 orjson
40 ];
41
42 nativeCheckInputs = [
43 aioresponses
44 pytest-aiohttp
45 pytest-cov-stub
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [ "pydeconz" ];
50
51 meta = with lib; {
52 description = "Python library wrapping the Deconz REST API";
53 homepage = "https://github.com/Kane610/deconz";
54 changelog = "https://github.com/Kane610/deconz/releases/tag/v${version}";
55 license = licenses.mit;
56 maintainers = with maintainers; [ fab ];
57 mainProgram = "pydeconz";
58 };
59}