1{
2 lib,
3 aiobotocore,
4 aiofiles,
5 buildPythonPackage,
6 chalice,
7 cryptography,
8 dill,
9 fetchFromGitHub,
10 moto,
11 poetry-core,
12 poetry-dynamic-versioning,
13 pytest-asyncio,
14 pytestCheckHook,
15 pythonOlder,
16 requests,
17}:
18
19buildPythonPackage rec {
20 pname = "aioboto3";
21 version = "13.1.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.8";
25
26 src = fetchFromGitHub {
27 owner = "terrycain";
28 repo = "aioboto3";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-g86RKQxTcfG1CIH3gfgn9Vl9JxUkeC1ztmLk4q/MVn0=";
31 };
32
33 build-system = [
34 poetry-core
35 poetry-dynamic-versioning
36 ];
37
38 pythonRelaxDeps = [ "aiobotocore" ];
39
40 dependencies = [
41 aiobotocore
42 aiofiles
43 ] ++ aiobotocore.optional-dependencies.boto3;
44
45 optional-dependencies = {
46 chalice = [ chalice ];
47 s3cse = [ cryptography ];
48 };
49
50 nativeCheckInputs = [
51 dill
52 moto
53 pytest-asyncio
54 pytestCheckHook
55 requests
56 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
57
58 pythonImportsCheck = [ "aioboto3" ];
59
60 disabledTests = [
61 # Our moto package is not ready to support more tests
62 "encrypt_decrypt_aes_cbc"
63 "test_chalice_async"
64 "test_dynamo"
65 "test_flush_doesnt_reset_item_buffer"
66 "test_kms"
67 "test_s3"
68 ];
69
70 meta = with lib; {
71 description = "Wrapper to use boto3 resources with the aiobotocore async backend";
72 homepage = "https://github.com/terrycain/aioboto3";
73 changelog = "https://github.com/terrycain/aioboto3/blob/${src.rev}/CHANGELOG.rst";
74 license = licenses.asl20;
75 maintainers = with maintainers; [ mbalatsko ];
76 };
77}