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