summary refs log tree commit diff
path: root/pkgs/development/python-modules/aiobotocore/default.nix
blob: 5f226d26018e512a66805f817787d9fae9b7ae5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{ lib
, aiohttp
, aioitertools
, botocore
, buildPythonPackage
, dill
, fetchFromGitHub
, flask
, flask-cors
, moto
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, wrapt
}:

buildPythonPackage rec {
  pname = "aiobotocore";
  version = "2.6.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "aio-libs";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-e8FBUG08yWNL9B51Uv4ftYx1C0kcdoweOreUtvvvTAk=";
  };

  # Relax version constraints: aiobotocore works with newer botocore versions
  # the pinning used to match some `extras_require` we're not using.
  postPatch = ''
    sed -i "s/'botocore>=.*'/'botocore'/" setup.py
  '';

  propagatedBuildInputs = [
    aiohttp
    aioitertools
    botocore
    wrapt
  ];

  nativeCheckInputs = [
    dill
    flask
    flask-cors
    moto
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "aiobotocore"
  ];

  disabledTestPaths = [
    # Tests require network access
    "tests/boto_tests/test_signers.py"
    "tests/python3.8/"
    "tests/test_basic_s3.py"
    "tests/test_batch.py"
    "tests/test_dynamodb.py"
    "tests/test_ec2.py"
    "tests/test_eventstreams.py"
    "tests/test_lambda.py"
    "tests/test_monitor.py"
    "tests/test_mturk.py"
    "tests/test_patches.py"
    "tests/test_sns.py"
    "tests/test_sqs.py"
    "tests/test_version.py"
    "tests/test_waiter.py"
  ];

  disabledTests = [
    "test_get_credential"
    "test_load_sso_credentials_without_cache"
    "test_load_sso_credentials"
    "test_required_config_not_set"
    "test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception"
    "test_sso_credential_fetcher_can_fetch_credentials"
  ];

  meta = with lib; {
    description = "Python client for amazon services";
    homepage = "https://github.com/aio-libs/aiobotocore";
    changelog = "https://github.com/aio-libs/aiobotocore/releases/tag/${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ teh ];
  };
}