depot/third_party/nixpkgs/pkgs/development/python-modules/aiorecollect/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

72 lines
1.5 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, freezegun
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiorecollect";
version = "2023.09.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-45LgfCA8037GqP4WfEjE4hj2YdKUGu2hGrQ/f0r1PAI=";
};
postPatch = ''
# this is not used directly by the project
sed -i '/certifi =/d' pyproject.toml
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
freezegun
pytest-asyncio
pytestCheckHook
];
disabledTestPaths = [
# Ignore the examples directory as the files are prefixed with test_.
"examples/"
];
pythonImportsCheck = [
"aiorecollect"
];
meta = with lib; {
description = "Python library for the Recollect Waste API";
longDescription = ''
aiorecollect is a Python asyncio-based library for the ReCollect
Waste API. It allows users to programmatically retrieve schedules
for waste removal in their area, including trash, recycling, compost
and more.
'';
homepage = "https://github.com/bachya/aiorecollect";
changelog = "https://github.com/bachya/aiorecollect/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}