at 24.11-pre 1.3 kB view raw
1{ 2 lib, 3 aiohttp, 4 async-timeout, 5 backports-zoneinfo, 6 buildPythonPackage, 7 fetchFromGitHub, 8 poetry-core, 9 pytest-asyncio, 10 pytest-timeout, 11 pytestCheckHook, 12 pythonOlder, 13 python-dotenv, 14}: 15 16buildPythonPackage rec { 17 pname = "aiopvpc"; 18 version = "4.3.1"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "azogue"; 25 repo = "aiopvpc"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-1xeXfhoXRfJ7vrpRPeYmwcAGjL09iNCOm/f4pPvuZLU="; 28 }; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace-fail " --cov --cov-report term --cov-report html" "" 33 ''; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 aiohttp 39 async-timeout 40 ] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]; 41 42 nativeCheckInputs = [ 43 pytest-asyncio 44 pytest-timeout 45 pytestCheckHook 46 python-dotenv 47 ]; 48 49 pythonImportsCheck = [ "aiopvpc" ]; 50 51 meta = with lib; { 52 description = "Python module to download Spanish electricity hourly prices (PVPC)"; 53 homepage = "https://github.com/azogue/aiopvpc"; 54 changelog = "https://github.com/azogue/aiopvpc/blob/v${version}/CHANGELOG.md"; 55 license = with licenses; [ mit ]; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}