1{ lib
2, buildPythonPackage
3, fetchPypi
4, botocore
5, jmespath
6, s3transfer
7, futures
8, docutils
9, nose
10, mock
11, isPy3k
12}:
13
14buildPythonPackage rec {
15 pname = "boto3";
16 version = "1.14.51"; # N.B: if you change this, change botocore too
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "a6bdb808e948bd264af135af50efb76253e85732c451fa605b7a287faf022432";
21 };
22
23 propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
24 checkInputs = [ docutils nose mock ];
25
26 checkPhase = ''
27 runHook preCheck
28 # This method is not in mock. It might have appeared in some versions.
29 sed -i 's/action.assert_called_once()/self.assertEqual(action.call_count, 1)/' \
30 tests/unit/resources/test_factory.py
31 nosetests -d tests/unit --verbose
32 runHook postCheck
33 '';
34
35 # Network access
36 doCheck = false;
37
38 meta = {
39 homepage = "https://github.com/boto/boto3";
40 license = lib.licenses.asl20;
41 description = "AWS SDK for Python";
42 longDescription = ''
43 Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
44 Python, which allows Python developers to write software that makes use of
45 services like Amazon S3 and Amazon EC2.
46 '';
47 };
48}