2021-06-21 11:29:08 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, attrs
|
|
|
|
, itsdangerous
|
|
|
|
, requests
|
|
|
|
, url-normalize
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests-mock
|
|
|
|
, timeout-decorator
|
|
|
|
}:
|
2018-04-03 12:03:30 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-cache";
|
2021-06-18 21:47:36 +00:00
|
|
|
version = "0.6.4";
|
2018-04-03 12:03:30 +00:00
|
|
|
|
2021-06-21 11:29:08 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "reclosedev";
|
|
|
|
repo = "requests-cache";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "10rvs611j16kakqx38kpqpc1v0dfb9rmbz2whpskswb1lsksv3j9";
|
2018-04-03 12:03:30 +00:00
|
|
|
};
|
|
|
|
|
2021-06-21 11:29:08 +00:00
|
|
|
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" ];
|
2018-04-03 12:03:30 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-03 12:03:30 +00:00
|
|
|
description = "Persistent cache for requests library";
|
2021-06-21 11:29:08 +00:00
|
|
|
homepage = "https://github.com/reclosedev/requests-cache";
|
2018-04-03 12:03:30 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|