1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 typing-extensions,
8 pytestCheckHook,
9 pytest-asyncio,
10 pytest-cov-stub,
11 pytest-timeout,
12}:
13
14buildPythonPackage rec {
15 pname = "async-lru";
16 version = "2.0.5";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "aio-libs";
21 repo = "async-lru";
22 tag = "v${version}";
23 hash = "sha256-FJ1q6W9IYs0OSMZc+bI4v22hOAAWAv2OW3BAqixm8Hs=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = lib.optionals (pythonOlder "3.11") [ typing-extensions ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 pytest-asyncio
33 pytest-cov-stub
34 pytest-timeout
35 ];
36
37 pythonImportsCheck = [ "async_lru" ];
38
39 meta = with lib; {
40 changelog = "https://github.com/aio-libs/async-lru/releases/tag/${src.tag}";
41 description = "Simple lru cache for asyncio";
42 homepage = "https://github.com/wikibusiness/async_lru";
43 license = licenses.mit;
44 maintainers = with maintainers; [ dotlambda ];
45 };
46}