depot/third_party/nixpkgs/pkgs/development/python-modules/aiopvpc/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

63 lines
1.2 KiB
Nix

{ lib
, aiohttp
, async-timeout
, backports-zoneinfo
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
, python-dotenv
}:
buildPythonPackage rec {
pname = "aiopvpc";
version = "4.2.1";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "azogue";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-gfF/SFfiZgkWH0cQZF3hxEp6xxRi46nfDBB23Gerv5g=";
};
postPatch = ''
substituteInPlace pyproject.toml --replace \
" --cov --cov-report term --cov-report html" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
async-timeout
] ++ lib.optionals (pythonOlder "3.9") [
backports-zoneinfo
];
nativeCheckInputs = [
pytest-asyncio
pytest-timeout
pytestCheckHook
python-dotenv
];
pythonImportsCheck = [
"aiopvpc"
];
meta = with lib; {
description = "Python module to download Spanish electricity hourly prices (PVPC)";
homepage = "https://github.com/azogue/aiopvpc";
changelog = "https://github.com/azogue/aiopvpc/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}