nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, betamax
3, buildPythonPackage
4, fetchpatch
5, fetchPypi
6, mock
7, pyopenssl
8, pytestCheckHook
9, requests
10}:
11
12buildPythonPackage rec {
13 pname = "requests-toolbelt";
14 version = "0.9.1";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-loCJ1FhK1K18FxRU8KXG2sI5celHJSHqO21J1hCqb8A=";
20 };
21
22 propagatedBuildInputs = [
23 requests
24 ];
25
26 checkInputs = [
27 betamax
28 mock
29 pyopenssl
30 pytestCheckHook
31 ];
32
33 patches = [
34 (fetchpatch {
35 # Fix collections.abc deprecation warning, https://github.com/requests/toolbelt/pull/246
36 name = "fix-collections-abc-deprecation.patch";
37 url = "https://github.com/requests/toolbelt/commit/7188b06330e5260be20bce8cbcf0d5ae44e34eaf.patch";
38 sha256 = "sha256-pRkG77sNglG/KsRX6JaPgk4QxmmSBXypFRp/vNA3ot4=";
39 })
40 ];
41
42 disabledTests = [
43 # https://github.com/requests/toolbelt/issues/306
44 "test_no_content_length_header"
45 "test_read_file"
46 "test_reads_file_from_url_wrapper"
47 "test_x509_der"
48 "test_x509_pem"
49 ];
50
51 pythonImportsCheck = [
52 "requests_toolbelt"
53 ];
54
55 meta = with lib; {
56 description = "Toolbelt of useful classes and functions to be used with requests";
57 homepage = "http://toolbelt.rtfd.org";
58 license = licenses.asl20;
59 maintainers = with maintainers; [ matthiasbeyer ];
60 };
61}