mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 00:16:33 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
109 lines
2 KiB
Nix
109 lines
2 KiB
Nix
{
|
|
lib,
|
|
attrs,
|
|
buildPythonPackage,
|
|
bson,
|
|
boto3,
|
|
botocore,
|
|
cattrs,
|
|
fetchFromGitHub,
|
|
itsdangerous,
|
|
platformdirs,
|
|
poetry-core,
|
|
psutil,
|
|
pymongo,
|
|
pytestCheckHook,
|
|
pytest-rerunfailures,
|
|
pytest-xdist,
|
|
pyyaml,
|
|
redis,
|
|
requests,
|
|
requests-mock,
|
|
responses,
|
|
rich,
|
|
tenacity,
|
|
time-machine,
|
|
timeout-decorator,
|
|
ujson,
|
|
urllib3,
|
|
url-normalize,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "requests-cache";
|
|
version = "1.2.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "requests-cache";
|
|
repo = "requests-cache";
|
|
tag = "v${version}";
|
|
hash = "sha256-juRCcBUr+Ko6kVPpUapwRbUGqWLKaRiCqppOc3S5FMU=";
|
|
};
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [
|
|
attrs
|
|
cattrs
|
|
platformdirs
|
|
requests
|
|
urllib3
|
|
url-normalize
|
|
];
|
|
|
|
optional-dependencies = {
|
|
dynamodb = [
|
|
boto3
|
|
botocore
|
|
];
|
|
mongodbo = [ pymongo ];
|
|
redis = [ redis ];
|
|
bson = [ bson ];
|
|
json = [ ujson ];
|
|
security = [ itsdangerous ];
|
|
yaml = [ pyyaml ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
psutil
|
|
pytestCheckHook
|
|
pytest-rerunfailures
|
|
pytest-xdist
|
|
requests-mock
|
|
responses
|
|
rich
|
|
tenacity
|
|
time-machine
|
|
timeout-decorator
|
|
]
|
|
++ optional-dependencies.json
|
|
++ optional-dependencies.security;
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d);
|
|
'';
|
|
|
|
enabledTestPaths = [
|
|
# Integration tests require local DBs
|
|
"tests/unit"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests are flaky in the sandbox
|
|
"test_remove_expired_responses"
|
|
# Tests that broke with urllib 2.0.5
|
|
"test_request_only_if_cached__stale_if_error__expired"
|
|
"test_stale_if_error__error_code"
|
|
];
|
|
|
|
pythonImportsCheck = [ "requests_cache" ];
|
|
|
|
meta = {
|
|
description = "Persistent cache for requests library";
|
|
homepage = "https://github.com/reclosedev/requests-cache";
|
|
changelog = "https://github.com/requests-cache/requests-cache/blob/v${version}/HISTORY.md";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|