1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pytestCheckHook
6, pytest-asyncio
7}:
8
9buildPythonPackage rec {
10 pname = "async-lru";
11 version = "unstable-2020-10-24";
12
13 disabled = pythonOlder "3.6";
14
15 src = fetchFromGitHub {
16 owner = "aio-libs";
17 repo = "async-lru";
18 rev = "ae252508f9c5aecf9c02ddeb879d06c28dbffc42";
19 sha256 = "1gk5qzdvhl2j1mw7xzchbw7bcgk9mzhvqa62nwwmvlbnx88pkwnc";
20 };
21
22 postPatch = ''
23 sed -i '/^addopts/d' setup.cfg
24 '';
25
26 checkInputs = [
27 pytestCheckHook
28 pytest-asyncio
29 ];
30
31 disabledTests = [
32 # https://github.com/aio-libs/async-lru/issues/341
33 "test_alru_cache_deco"
34 "test_alru_cache_fn_called"
35 "test_close"
36 ];
37
38 pythonImportsCheck = [ "async_lru" ];
39
40 meta = with lib; {
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}