depot/third_party/nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, aiohttp
, async-timeout
, backports-zoneinfo
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
, tzdata
}:
buildPythonPackage rec {
pname = "aiopvpc";
version = "2.1.2";
disabled = pythonOlder "3.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "azogue";
repo = pname;
rev = "v${version}";
sha256 = "0s8ki46dh39kw6qvsjcfcxa0gblyi33m3hry137kbi4lw5ws6qhr";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
backports-zoneinfo
tzdata
async-timeout
];
checkInputs = [
pytest-asyncio
pytest-timeout
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml --replace \
" --cov --cov-report term --cov-report html" ""
'';
pythonImportsCheck = [ "aiopvpc" ];
meta = with lib; {
description = "Python module to download Spanish electricity hourly prices (PVPC)";
homepage = "https://github.com/azogue/aiopvpc";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}