about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/requests-cache/default.nix
blob: 35cf74ca84265503939ed81fd6dd900e91355f1e (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
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, attrs
, itsdangerous
, requests
, url-normalize
, pytestCheckHook
, requests-mock
, timeout-decorator
}:

buildPythonPackage rec {
  pname = "requests-cache";
  version = "0.6.4";

  disabled = pythonOlder "3.6";

  format = "pyproject";

  src = fetchFromGitHub {
    owner = "reclosedev";
    repo = "requests-cache";
    rev = "v${version}";
    sha256 = "10rvs611j16kakqx38kpqpc1v0dfb9rmbz2whpskswb1lsksv3j9";
  };

  propagatedBuildInputs = [
    attrs
    itsdangerous
    requests
    url-normalize
  ];

  checkInputs = [
    pytestCheckHook
    requests-mock
    timeout-decorator
  ];

  disabledTestPaths = [
    # connect to database on localhost
    "tests/integration/test_cache.py"
    "tests/integration/test_dynamodb.py"
    "tests/integration/test_gridfs.py"
    "tests/integration/test_mongodb.py"
    "tests/integration/test_redis.py"
  ];

  pythonImportsCheck = [ "requests_cache" ];

  meta = with lib; {
    description = "Persistent cache for requests library";
    homepage = "https://github.com/reclosedev/requests-cache";
    license = licenses.bsd3;
  };
}