1{ lib
2, botocore
3, buildPythonPackage
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7, stdenv
8}:
9
10buildPythonPackage rec {
11 pname = "s3transfer";
12 version = "0.7.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "boto";
19 repo = pname;
20 rev = version;
21 hash = "sha256-EvLqRvm9E1Taf+JvbhQbfJqIlbu2a+rB2MX0IO90x98=";
22 };
23
24 propagatedBuildInputs = [ botocore ];
25
26 nativeCheckInputs = [ pytestCheckHook ];
27
28 disabledTestPaths = [
29 # Requires network access
30 "tests/integration"
31 ] ++
32 # There was a change in python 3.8 that defaults multiprocessing to spawn instead of fork on macOS
33 # See https://bugs.python.org/issue33725 and https://github.com/python/cpython/pull/13603.
34 # 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
35 lib.optionals stdenv.isDarwin [ "tests/unit/test_compat.py" ];
36
37 pythonImportsCheck = [ "s3transfer" ];
38
39 meta = with lib; {
40 description = "Library for managing Amazon S3 transfers";
41 homepage = "https://github.com/boto/s3transfer";
42 changelog = "https://github.com/boto/s3transfer/blob/${version}/CHANGELOG.rst";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ nickcao ];
45 };
46}