summary refs log tree commit diff
path: root/pkgs/development/python-modules/requests-toolbelt/default.nix
blob: 0417154a4a3105ae4ed34858ef5c07c0035cf427 (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
{ lib
, betamax
, buildPythonPackage
, fetchpatch
, fetchPypi
, mock
, pyopenssl
, pytestCheckHook
, requests
}:

buildPythonPackage rec {
  pname = "requests-toolbelt";
  version = "0.9.1";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-loCJ1FhK1K18FxRU8KXG2sI5celHJSHqO21J1hCqb8A=";
  };

  propagatedBuildInputs = [
    requests
  ];

  checkInputs = [
    betamax
    mock
    pyopenssl
    pytestCheckHook
  ];

  patches = [
    (fetchpatch {
      # Fix collections.abc deprecation warning, https://github.com/requests/toolbelt/pull/246
      name = "fix-collections-abc-deprecation.patch";
      url = "https://github.com/requests/toolbelt/commit/7188b06330e5260be20bce8cbcf0d5ae44e34eaf.patch";
      sha256 = "sha256-pRkG77sNglG/KsRX6JaPgk4QxmmSBXypFRp/vNA3ot4=";
    })
  ];

  disabledTests = [
    # https://github.com/requests/toolbelt/issues/306
    "test_no_content_length_header"
    "test_read_file"
    "test_reads_file_from_url_wrapper"
    "test_x509_der"
    "test_x509_pem"
  ];

  pythonImportsCheck = [
    "requests_toolbelt"
  ];

  meta = with lib; {
    description = "Toolbelt of useful classes and functions to be used with requests";
    homepage = "http://toolbelt.rtfd.org";
    license = licenses.asl20;
    maintainers = with maintainers; [ matthiasbeyer ];
  };
}