1{
2 lib,
3 aiohttp,
4 aiozoneinfo,
5 arrow,
6 buildPythonPackage,
7 cryptography,
8 fetchFromGitHub,
9 pyotp,
10 python-dotenv,
11 pytestCheckHook,
12 pythonOlder,
13 setuptools,
14}:
15
16buildPythonPackage rec {
17 pname = "opower";
18 version = "0.12.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "tronikos";
25 repo = "opower";
26 tag = "v${version}";
27 hash = "sha256-pkjVabTHehS0tToFF6KgD7SH89cdLEzUuVQUphZF1Y4=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 aiohttp
34 aiozoneinfo
35 arrow
36 cryptography
37 pyotp
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 python-dotenv
43 ];
44
45 pythonImportsCheck = [ "opower" ];
46
47 meta = with lib; {
48 description = "Module for getting historical and forecasted usage/cost from utilities that use opower.com";
49 homepage = "https://github.com/tronikos/opower";
50 changelog = "https://github.com/tronikos/opower/releases/tag/v${version}";
51 license = licenses.asl20;
52 maintainers = with maintainers; [ fab ];
53 };
54}