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

90 lines
1.9 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, freezegun
, poetry-core
, pyjwt
, pytest-aiohttp
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, pytz
, titlecase
, types-pytz
}:
buildPythonPackage rec {
pname = "aioridwell";
version = "2023.08.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-AreQC5LOthnOEj0HnEww4zLob394XwCvqZBwjsT2Lcg=";
};
patches = [
# This patch removes references to setuptools and wheel that are no longer
# necessary and changes poetry to poetry-core, so that we don't need to add
# unnecessary nativeBuildInputs.
#
# https://github.com/bachya/aioridwell/pull/234
#
(fetchpatch {
name = "clean-up-build-dependencies.patch";
url = "https://github.com/bachya/aioridwell/commit/79a9dd7462dcfeb0833abca73a1f184827120a6f.patch";
hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
})
];
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pyjwt
pytz
titlecase
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
freezegun
pytest-aiohttp
pytest-asyncio
pytestCheckHook
types-pytz
];
disabledTests = [
# AssertionError: assert datetime.date(...
"test_get_next_pickup_event"
];
disabledTestPaths = [
# Ignore the examples directory as the files are prefixed with test_
"examples/"
];
pythonImportsCheck = [
"aioridwell"
];
meta = with lib; {
description = "Python library for interacting with Ridwell waste recycling";
homepage = "https://github.com/bachya/aioridwell";
changelog = "https://github.com/bachya/aioridwell/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}