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";
|
2021-09-23 15:35:13 +00:00
|
|
|
version = "0.8.1";
|
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}";
|
2021-09-23 15:35:13 +00:00
|
|
|
sha256 = "sha256-HzOcPWmvUhqPtb/7Mnw6wWY7a4CwGRwPgq+7QoHJAc8=";
|
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-07-14 22:03:04 +00:00
|
|
|
# Integration tests require local DBs
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2021-06-28 23:13:55 +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
|
|
|
};
|
|
|
|
}
|