1{ lib
2, aiohttp
3, async-timeout
4, backports-zoneinfo
5, buildPythonPackage
6, fetchFromGitHub
7, holidays
8, poetry-core
9, pytest-asyncio
10, pytest-timeout
11, pytestCheckHook
12, pythonOlder
13, tzdata
14}:
15
16buildPythonPackage rec {
17 pname = "aiopvpc";
18 version = "2.2.4";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "azogue";
25 repo = pname;
26 rev = "v${version}";
27 sha256 = "sha256-39cGDbaBS5we+WbqvABe6tKwTmbgd+NYLssKQCOuBsc=";
28 };
29
30 nativeBuildInputs = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 backports-zoneinfo
37 holidays
38 tzdata
39 async-timeout
40 ];
41
42 checkInputs = [
43 pytest-asyncio
44 pytest-timeout
45 pytestCheckHook
46 ];
47
48 postPatch = ''
49 substituteInPlace pyproject.toml --replace \
50 " --cov --cov-report term --cov-report html" ""
51 '';
52
53 pythonImportsCheck = [
54 "aiopvpc"
55 ];
56
57 meta = with lib; {
58 description = "Python module to download Spanish electricity hourly prices (PVPC)";
59 homepage = "https://github.com/azogue/aiopvpc";
60 license = with licenses; [ mit ];
61 maintainers = with maintainers; [ fab ];
62 };
63}