2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2023-02-22 10:55:15 +00:00
|
|
|
, typing-extensions
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "async-lru";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "2.0.4";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aio-libs";
|
|
|
|
repo = "async-lru";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-S2sOkgtS+YdMtVP7UHD3+oR8Fem8roLhhgVVfh33PcM=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
|
2023-02-22 10:55:15 +00:00
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
sed -i -e '/^addopts/d' -e '/^filterwarnings/,+2d' setup.cfg
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "async_lru" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple lru cache for asyncio";
|
|
|
|
homepage = "https://github.com/wikibusiness/async_lru";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|