depot/third_party/nixpkgs/pkgs/development/python-modules/aioopenexchangerates/default.nix
Default email eaf6957cd3 Project import generated by Copybara.
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
2023-03-27 12:17:25 -07:00

58 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aioresponses
, pydantic
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aioopenexchangerates";
version = "0.4.2";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "MartinHjelmare";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Ykbw/s932XXX3qWutWUOLV1O9MMgBWPJNveKG8SDhWY=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pydantic
];
nativeCheckInputs = [
aioresponses
pytest-aiohttp
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=aioopenexchangerates --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"aioopenexchangerates"
];
meta = with lib; {
description = "Library for the Openexchangerates API";
homepage = "https://github.com/MartinHjelmare/aioopenexchangerates";
changelog = "https://github.com/MartinHjelmare/aioopenexchangerates/blob/vv${version}/CHANGELOG.md";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}