2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
2023-01-20 10:41:00 +00:00
|
|
|
, stdenv
|
2022-06-26 10:26:21 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, cachelib
|
|
|
|
, flask
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-xprocess
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Flask-Caching";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "2.0.2";
|
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 {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-JLYMVS1ZqWBcwbakLFbNs5qCoo2rRTK77bkiKuVOy04=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachelib
|
|
|
|
flask
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-xprocess
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
# backend_cache relies on pytest-cache, which is a stale package from 2013
|
|
|
|
"backend_cache"
|
|
|
|
# optional backends
|
|
|
|
"Redis"
|
|
|
|
"Memcache"
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# ignore flaky test
|
|
|
|
"test_cached_view_class"
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
description = "A caching extension for Flask";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|