2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
cachelib,
|
|
|
|
flask,
|
|
|
|
asgiref,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-xprocess,
|
|
|
|
pytestCheckHook,
|
2022-06-26 10:26:21 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "flask-caching";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "2.1.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "setuptools";
|
2022-06-26 10:26:21 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "Flask-Caching";
|
|
|
|
inherit version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-t1AMFFE1g2qVLj3jqAiB2WVOMnopyFLJJlYH9cRJI1w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "cachelib >= 0.9.0, < 0.10.0" "cachelib"
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachelib
|
|
|
|
flask
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
asgiref
|
2022-06-26 10:26:21 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-xprocess
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# backend_cache relies on pytest-cache, which is a stale package from 2013
|
|
|
|
"backend_cache"
|
|
|
|
# optional backends
|
|
|
|
"Redis"
|
|
|
|
"Memcache"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# ignore flaky test
|
|
|
|
"test_cache_timeout_dynamic"
|
|
|
|
"test_cached_view_class"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Caching extension for Flask";
|
2023-01-20 10:41:00 +00:00
|
|
|
homepage = "https://github.com/pallets-eco/flask-caching";
|
|
|
|
changelog = "https://github.com/pallets-eco/flask-caching/blob/v${version}/CHANGES.rst";
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|