1{ lib
2, botocore
3, buildPythonPackage
4, docutils
5, fetchFromGitHub
6, mock
7, pytestCheckHook
8, pythonOlder
9, stdenv
10, wheel
11}:
12
13buildPythonPackage rec {
14 pname = "s3transfer";
15 version = "0.6.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "boto";
22 repo = pname;
23 rev = version;
24 hash = "sha256-LM1/joc6TeyLLeAHpuCTz2vgpQ3TMkHrKitfiUp5ZrY=";
25 };
26
27 propagatedBuildInputs = [ botocore ];
28
29 buildInputs = [ docutils mock pytestCheckHook wheel ];
30
31 disabledTestPaths = [
32 # Requires network access
33 "tests/integration/test_copy.py"
34 "tests/integration/test_delete.py"
35 "tests/integration/test_download.py"
36 "tests/integration/test_processpool.py"
37 "tests/integration/test_s3transfer.py"
38 "tests/integration/test_upload.py"
39 ] ++
40 # There was a change in python 3.8 that defaults multiprocessing to spawn instead of fork on macOS
41 # See https://bugs.python.org/issue33725 and https://github.com/python/cpython/pull/13603.
42 # I suspect the underlying issue here is that upstream tests aren't compatible with spawn multiprocessing, and pass on linux where the default is still fork
43 lib.optionals stdenv.isDarwin [ "tests/unit/test_compat.py" ];
44
45 pythonImportsCheck = [ "s3transfer" ];
46
47 meta = with lib; {
48 description = "Library for managing Amazon S3 transfers";
49 homepage = "https://github.com/boto/s3transfer";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ ];
52 };
53}