e298e86197
1. This version removes upper version constraints, so existing patches that unconstrain versions can be removed. 2. The repository owner was changed some time earlier. It works today because GitHub issues a 301 redirect to the new owner. Updates to the new owner to skip the 301 redirect.
114 lines
1.7 KiB
Nix
114 lines
1.7 KiB
Nix
{ lib
|
|
, appdirs
|
|
, attrs
|
|
, buildPythonPackage
|
|
, bson
|
|
, boto3
|
|
, botocore
|
|
, cattrs
|
|
, exceptiongroup
|
|
, fetchFromGitHub
|
|
, itsdangerous
|
|
, poetry-core
|
|
, pymongo
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pyyaml
|
|
, redis
|
|
, requests
|
|
, requests-mock
|
|
, rich
|
|
, timeout-decorator
|
|
, ujson
|
|
, urllib3
|
|
, url-normalize
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "requests-cache";
|
|
version = "0.9.6";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "requests-cache";
|
|
repo = "requests-cache";
|
|
rev = "v${version}";
|
|
hash = "sha256-oFI5Rv/MAiPHiZts0PrNS+YMDFD/RxnMJ6deTxZNkSM=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
appdirs
|
|
attrs
|
|
cattrs
|
|
exceptiongroup
|
|
requests
|
|
urllib3
|
|
url-normalize
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
dynamodb = [
|
|
boto3
|
|
botocore
|
|
];
|
|
mongodbo = [
|
|
pymongo
|
|
];
|
|
redis = [
|
|
redis
|
|
];
|
|
bson = [
|
|
bson
|
|
];
|
|
json = [
|
|
ujson
|
|
];
|
|
security = [
|
|
itsdangerous
|
|
];
|
|
yaml = [
|
|
pyyaml
|
|
];
|
|
};
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
requests-mock
|
|
rich
|
|
timeout-decorator
|
|
]
|
|
++ passthru.optional-dependencies.json
|
|
++ passthru.optional-dependencies.security;
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d);
|
|
'';
|
|
|
|
pytestFlagsArray = [
|
|
# Integration tests require local DBs
|
|
"tests/unit"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests are flaky in the sandbox
|
|
"test_remove_expired_responses"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"requests_cache"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Persistent cache for requests library";
|
|
homepage = "https://github.com/reclosedev/requests-cache";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|