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