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
|
2022-08-12 12:06:08 +00:00
|
|
|
, boto3
|
|
|
|
, botocore
|
2021-07-14 22:03:04 +00:00
|
|
|
, cattrs
|
2022-08-12 12:06:08 +00:00
|
|
|
, exceptiongroup
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, itsdangerous
|
2021-07-14 22:03:04 +00:00
|
|
|
, poetry-core
|
2022-08-12 12:06:08 +00:00
|
|
|
, pymongo
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2022-08-12 12:06:08 +00:00
|
|
|
, redis
|
2021-07-14 22:03:04 +00:00
|
|
|
, 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
|
2022-08-12 12:06:08 +00:00
|
|
|
, urllib3
|
2021-07-14 22:03:04 +00:00
|
|
|
, url-normalize
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-cache";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.9.8";
|
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 {
|
2022-09-09 14:08:57 +00:00
|
|
|
owner = "requests-cache";
|
2021-06-28 23:13:55 +00:00
|
|
|
repo = "requests-cache";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Xbzbwz80xY8IDPDhZEUhmmiCFJZvSQMQ6EmE4EL7QGo=";
|
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-07-14 22:03:04 +00:00
|
|
|
cattrs
|
2022-08-12 12:06:08 +00:00
|
|
|
exceptiongroup
|
2021-06-28 23:13:55 +00:00
|
|
|
requests
|
2022-08-12 12:06:08 +00:00
|
|
|
urllib3
|
2021-06-28 23:13:55 +00:00
|
|
|
url-normalize
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
dynamodb = [
|
|
|
|
boto3
|
|
|
|
botocore
|
|
|
|
];
|
|
|
|
mongodbo = [
|
|
|
|
pymongo
|
|
|
|
];
|
|
|
|
redis = [
|
|
|
|
redis
|
|
|
|
];
|
|
|
|
bson = [
|
|
|
|
bson
|
|
|
|
];
|
|
|
|
json = [
|
|
|
|
ujson
|
|
|
|
];
|
|
|
|
security = [
|
|
|
|
itsdangerous
|
|
|
|
];
|
|
|
|
yaml = [
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2021-07-14 22:03:04 +00:00
|
|
|
rich
|
2021-06-28 23:13:55 +00:00
|
|
|
timeout-decorator
|
2022-08-12 12:06:08 +00:00
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.json
|
|
|
|
++ passthru.optional-dependencies.security;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
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";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/requests-cache/requests-cache/blob/v${version}/HISTORY.md";
|
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
|
|
|
};
|
|
|
|
}
|