2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2021-09-23 15:35:13 +00:00
|
|
|
, appdirs
|
2021-07-14 22:03:04 +00:00
|
|
|
, attrs
|
2021-06-28 23:13:55 +00:00
|
|
|
, buildPythonPackage
|
2021-09-23 15:35:13 +00:00
|
|
|
, bson
|
2021-07-14 22:03:04 +00:00
|
|
|
, cattrs
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, itsdangerous
|
2021-07-14 22:03:04 +00:00
|
|
|
, poetry-core
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
2021-06-28 23:13:55 +00:00
|
|
|
, requests-mock
|
2021-07-14 22:03:04 +00:00
|
|
|
, rich
|
2021-06-28 23:13:55 +00:00
|
|
|
, timeout-decorator
|
2021-07-14 22:03:04 +00:00
|
|
|
, ujson
|
|
|
|
, url-normalize
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-cache";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "0.9.0";
|
2021-06-28 23:13:55 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "reclosedev";
|
|
|
|
repo = "requests-cache";
|
|
|
|
rev = "v${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "0gz6fyc6lgbab9k92cihrp3711r1wcp4xhs25qp176zbzgccbj43";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-23 15:35:13 +00:00
|
|
|
appdirs
|
2021-06-28 23:13:55 +00:00
|
|
|
attrs
|
2021-09-23 15:35:13 +00:00
|
|
|
bson
|
2021-07-14 22:03:04 +00:00
|
|
|
cattrs
|
2021-06-28 23:13:55 +00:00
|
|
|
itsdangerous
|
2021-07-14 22:03:04 +00:00
|
|
|
pyyaml
|
2021-06-28 23:13:55 +00:00
|
|
|
requests
|
2021-07-14 22:03:04 +00:00
|
|
|
ujson
|
2021-06-28 23:13:55 +00:00
|
|
|
url-normalize
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2021-07-14 22:03:04 +00:00
|
|
|
rich
|
2021-06-28 23:13:55 +00:00
|
|
|
timeout-decorator
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# Integration tests require local DBs
|
|
|
|
"tests/unit"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests are flaky in the sandbox
|
|
|
|
"test_remove_expired_responses"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"requests_cache"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Persistent cache for requests library";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/reclosedev/requests-cache";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2021-07-14 22:03:04 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|