1{ lib
2, fetchPypi
3, pythonOlder
4, buildPythonPackage
5, docutils
6, mock
7, nose
8, coverage
9, wheel
10, unittest2
11, botocore
12, futures ? null
13}:
14
15buildPythonPackage rec {
16 pname = "s3transfer";
17 version = "0.4.2";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "sha256-ywIvSxZVHt67sxo3fT8JYA262nNj2MXbeXbn9Hcy4bI=";
22 };
23
24 propagatedBuildInputs =
25 [
26 botocore
27 ] ++ lib.optional (pythonOlder "3") futures;
28
29 buildInputs = [
30 docutils
31 mock
32 nose
33 coverage
34 wheel
35 unittest2
36 ];
37
38 checkPhase = ''
39 pushd s3transfer/tests
40 nosetests -v unit/ functional/
41 popd
42 '';
43
44 # version on pypi has no tests/ dir
45 doCheck = false;
46
47 meta = with lib; {
48 homepage = "https://github.com/boto/s3transfer";
49 license = licenses.asl20;
50 description = "A library for managing Amazon S3 transfers";
51 };
52}