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-07-27 06:49:29 +00:00
|
|
|
version = "2.3.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-07-27 06:49:29 +00:00
|
|
|
pname = "flask_caching";
|
2024-04-21 15:54:59 +00:00
|
|
|
inherit version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-1+TKZKM7Sf6zOfzdF+a6JfXgEWjPiF5TeQ6IX4Ok0s8=";
|
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"
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
# 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";
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|