mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-14 03:50:21 +08:00
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
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.7";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "requests-cache";
|
|
repo = "requests-cache";
|
|
rev = "v${version}";
|
|
hash = "sha256-HSYu4jOEMXI/zGuWI7invYVvVeeM5+dDlc+9h8TOGms=";
|
|
};
|
|
|
|
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
|
|
];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
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 ];
|
|
};
|
|
}
|