1{
2 lib,
3 aiohttp,
4 aioitertools,
5 botocore,
6 buildPythonPackage,
7 dill,
8 fetchFromGitHub,
9 flask,
10 flask-cors,
11 awscli,
12 moto,
13 boto3,
14 setuptools,
15 pytest-asyncio,
16 pytestCheckHook,
17 pythonAtLeast,
18 pythonOlder,
19 wrapt,
20}:
21
22buildPythonPackage rec {
23 pname = "aiobotocore";
24 version = "2.12.3";
25 pyproject = true;
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchFromGitHub {
30 owner = "aio-libs";
31 repo = "aiobotocore";
32 rev = "refs/tags/${version}";
33 hash = "sha256-Us94kT7UhTTwMxF63iLLczXZhfr/Z8cJr12DKEphkog=";
34 };
35
36 # Relax version constraints: aiobotocore works with newer botocore versions
37 # the pinning used to match some `extras_require` we're not using.
38 postPatch = ''
39 sed -i "s/'botocore>=.*'/'botocore'/" setup.py
40 '';
41
42 nativeBuildInputs = [ setuptools ];
43
44 propagatedBuildInputs = [
45 aiohttp
46 aioitertools
47 botocore
48 wrapt
49 ];
50
51 passthru.optional-dependencies = {
52 awscli = [ awscli ];
53 boto3 = [ boto3 ];
54 };
55
56 nativeCheckInputs = [
57 dill
58 flask
59 flask-cors
60 moto
61 pytest-asyncio
62 pytestCheckHook
63 ];
64
65 pythonImportsCheck = [ "aiobotocore" ];
66
67 disabledTestPaths = [
68 # Tests require network access
69 "tests/boto_tests/test_signers.py"
70 "tests/python3.8/"
71 "tests/test_basic_s3.py"
72 "tests/test_batch.py"
73 "tests/test_dynamodb.py"
74 "tests/test_ec2.py"
75 "tests/test_eventstreams.py"
76 "tests/test_lambda.py"
77 "tests/test_monitor.py"
78 "tests/test_mturk.py"
79 "tests/test_patches.py"
80 "tests/test_sns.py"
81 "tests/test_sqs.py"
82 "tests/test_version.py"
83 "tests/test_waiter.py"
84 ];
85
86 disabledTests =
87 [
88 "test_get_credential"
89 "test_load_sso_credentials_without_cache"
90 "test_load_sso_credentials"
91 "test_required_config_not_set"
92 "test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception"
93 "test_sso_credential_fetcher_can_fetch_credentials"
94 ]
95 ++ lib.optionals (pythonAtLeast "3.12.") [
96 # AttributeError: 'called_with' is not a valid assertion. Use a spec for the mock if 'called_with' is meant to be an attribute.
97 "test_max_rate_updated_on_success_response"
98 "test_max_rate_cant_exceed_20_percent_max"
99 ];
100
101 __darwinAllowLocalNetworking = true;
102
103 meta = with lib; {
104 description = "Python client for amazon services";
105 homepage = "https://github.com/aio-libs/aiobotocore";
106 changelog = "https://github.com/aio-libs/aiobotocore/releases/tag/${version}";
107 license = licenses.asl20;
108 maintainers = with maintainers; [ teh ];
109 };
110}