1{ 2 lib, 3 aioboto3, 4 aiobotocore, 5 aiofiles, 6 aiohttp, 7 aiosqlite, 8 attrs, 9 buildPythonPackage, 10 faker, 11 fetchPypi, 12 itsdangerous, 13 motor, 14 poetry-core, 15 pytest-asyncio, 16 pytest-aiohttp, 17 pytestCheckHook, 18 redis, 19 url-normalize, 20}: 21 22buildPythonPackage rec { 23 pname = "aiohttp-client-cache"; 24 version = "0.14.0"; 25 pyproject = true; 26 27 src = fetchPypi { 28 pname = "aiohttp_client_cache"; 29 inherit version; 30 hash = "sha256-onEcLEhhTLljQ57No49shj5Jv6bqF1t9/7z1yCRfzxk="; 31 }; 32 33 build-system = [ poetry-core ]; 34 35 dependencies = [ 36 aiohttp 37 attrs 38 itsdangerous 39 url-normalize 40 ]; 41 42 optional-dependencies = { 43 all = [ 44 aioboto3 45 aiobotocore 46 aiofiles 47 aiosqlite 48 motor 49 redis 50 ]; 51 dynamodb = [ 52 aioboto3 53 aiobotocore 54 ]; 55 filesystem = [ 56 aiofiles 57 aiosqlite 58 ]; 59 mongodb = [ motor ]; 60 redis = [ redis ]; 61 sqlite = [ aiosqlite ]; 62 }; 63 64 nativeCheckInputs = [ 65 faker 66 pytest-asyncio 67 pytest-aiohttp 68 pytestCheckHook 69 ] 70 ++ lib.flatten (builtins.attrValues optional-dependencies); 71 72 pytestFlags = [ "--asyncio-mode=auto" ]; 73 74 pythonImportsCheck = [ "aiohttp_client_cache" ]; 75 76 disabledTestPaths = [ 77 # Tests require running instances of the services 78 "test/integration/*" 79 ]; 80 81 meta = with lib; { 82 description = "Async persistent cache for aiohttp requests"; 83 homepage = "https://github.com/requests-cache/aiohttp-client-cache"; 84 changelog = "https://github.com/requests-cache/aiohttp-client-cache/blob/v${version}/HISTORY.md"; 85 license = licenses.mit; 86 maintainers = with maintainers; [ seirl ]; 87 }; 88}