Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 62 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 cachelib, 7 flask, 8 asgiref, 9 pytest-asyncio, 10 pytest-xprocess, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "flask-caching"; 16 version = "2.3.1"; 17 format = "setuptools"; 18 19 src = fetchPypi { 20 pname = "flask_caching"; 21 inherit version; 22 hash = "sha256-Zdf9G07r+BD4RN595iWCVLMkgpbuQpvcs/dBvL97mMk="; 23 }; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "cachelib >= 0.9.0, < 0.10.0" "cachelib" 28 ''; 29 30 propagatedBuildInputs = [ 31 cachelib 32 flask 33 ]; 34 35 nativeCheckInputs = [ 36 asgiref 37 pytest-asyncio 38 pytest-xprocess 39 pytestCheckHook 40 ]; 41 42 disabledTests = [ 43 # backend_cache relies on pytest-cache, which is a stale package from 2013 44 "backend_cache" 45 # optional backends 46 "Redis" 47 "Memcache" 48 ] 49 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 50 # ignore flaky test 51 "test_cache_timeout_dynamic" 52 "test_cached_view_class" 53 ]; 54 55 meta = { 56 description = "Caching extension for Flask"; 57 homepage = "https://github.com/pallets-eco/flask-caching"; 58 changelog = "https://github.com/pallets-eco/flask-caching/blob/v${version}/CHANGES.rst"; 59 maintainers = [ ]; 60 license = lib.licenses.bsd3; 61 }; 62}