2021-06-21 11:29:08 +00:00
|
|
|
{ lib
|
2021-09-21 21:47:32 +00:00
|
|
|
, appdirs
|
2021-07-08 10:10:02 +00:00
|
|
|
, attrs
|
2021-06-21 11:29:08 +00:00
|
|
|
, buildPythonPackage
|
2021-09-21 21:47:32 +00:00
|
|
|
, bson
|
2021-07-08 10:10:02 +00:00
|
|
|
, cattrs
|
2021-06-21 11:29:08 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, itsdangerous
|
2021-07-08 10:10:02 +00:00
|
|
|
, poetry-core
|
2021-06-21 11:29:08 +00:00
|
|
|
, pytestCheckHook
|
2021-07-08 10:10:02 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
2021-06-21 11:29:08 +00:00
|
|
|
, requests-mock
|
2021-07-08 10:10:02 +00:00
|
|
|
, rich
|
2021-06-21 11:29:08 +00:00
|
|
|
, timeout-decorator
|
2021-07-08 10:10:02 +00:00
|
|
|
, ujson
|
|
|
|
, url-normalize
|
2021-06-21 11:29:08 +00:00
|
|
|
}:
|
2018-04-03 12:03:30 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-cache";
|
2021-09-21 21:47:32 +00:00
|
|
|
version = "0.8.1";
|
2021-06-21 11:29:08 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-09-21 21:47:32 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-06-21 11:29:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "reclosedev";
|
|
|
|
repo = "requests-cache";
|
|
|
|
rev = "v${version}";
|
2021-09-21 21:47:32 +00:00
|
|
|
sha256 = "sha256-HzOcPWmvUhqPtb/7Mnw6wWY7a4CwGRwPgq+7QoHJAc8=";
|
2018-04-03 12:03:30 +00:00
|
|
|
};
|
|
|
|
|
2021-07-08 10:10:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-06-21 11:29:08 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-21 21:47:32 +00:00
|
|
|
appdirs
|
2021-06-21 11:29:08 +00:00
|
|
|
attrs
|
2021-09-21 21:47:32 +00:00
|
|
|
bson
|
2021-07-08 10:10:02 +00:00
|
|
|
cattrs
|
2021-06-21 11:29:08 +00:00
|
|
|
itsdangerous
|
2021-07-08 10:10:02 +00:00
|
|
|
pyyaml
|
2021-06-21 11:29:08 +00:00
|
|
|
requests
|
2021-07-08 10:10:02 +00:00
|
|
|
ujson
|
2021-06-21 11:29:08 +00:00
|
|
|
url-normalize
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2021-07-08 10:10:02 +00:00
|
|
|
rich
|
2021-06-21 11:29:08 +00:00
|
|
|
timeout-decorator
|
|
|
|
];
|
|
|
|
|
2021-07-08 10:10:02 +00:00
|
|
|
# Integration tests require local DBs
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2021-06-21 11:29:08 +00:00
|
|
|
|
|
|
|
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;
|
2021-07-08 10:10:02 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2018-04-03 12:03:30 +00:00
|
|
|
};
|
|
|
|
}
|