1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 loguru,
7 numpy,
8 pythonOlder,
9 setuptools,
10 unasync,
11 urllib3,
12}:
13
14buildPythonPackage rec {
15 pname = "pyosohotwaterapi";
16 version = "1.1.4";
17 pyproject = true;
18
19 disabled = pythonOlder "3.10";
20
21 src = fetchFromGitHub {
22 owner = "osohotwateriot";
23 repo = "apyosohotwaterapi";
24 tag = version;
25 hash = "sha256-7FLGmmndrFqSl4oC8QFIYNlFJPr+xbiZG5ZRt4vx8+s=";
26 };
27
28 # https://github.com/osohotwateriot/apyosohotwaterapi/pull/3
29 pythonRemoveDeps = [ "pre-commit" ];
30
31 build-system = [
32 setuptools
33 unasync
34 ];
35
36 dependencies = [
37 aiohttp
38 loguru
39 numpy
40 urllib3
41 ];
42
43 preBuild = ''
44 export HOME=$(mktemp -d)
45 '';
46
47 # Module has no tests
48 doCheck = false;
49
50 pythonImportsCheck = [ "apyosoenergyapi" ];
51
52 meta = with lib; {
53 description = "Module for using the OSO Hotwater API";
54 homepage = "https://github.com/osohotwateriot/apyosohotwaterapi";
55 changelog = "https://github.com/osohotwateriot/apyosohotwaterapi/releases/tag/${version}";
56 license = licenses.mit;
57 maintainers = with maintainers; [ fab ];
58 };
59}