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