1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, pytest-django 6, pytest-xdist 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "diskcache"; 13 version = "5.4.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchFromGitHub { 19 owner = "grantjenks"; 20 repo = "python-diskcache"; 21 rev = "v${version}"; 22 hash = "sha256-c/k8mx/T4RkseDobJ2gtcuom0A6Ewyw4aP2Bk9pxV+o="; 23 }; 24 25 checkInputs = [ 26 pytest-django 27 pytest-xdist 28 pytestCheckHook 29 ]; 30 31 postPatch = '' 32 sed -i "/--cov/d" tox.ini 33 ''; 34 35 # Darwin sandbox causes most tests to fail 36 doCheck = !stdenv.isDarwin; 37 38 disabledTests = [ 39 # Very time sensitive, can fail on over subscribed machines 40 "test_incr_update_keyerror" 41 # AssertionError: 'default' is not None 42 "test_decr_version" 43 "test_incr_version" 44 "test_get_or_set" 45 "test_get_many" 46 # see https://github.com/grantjenks/python-diskcache/issues/260 47 "test_cache_write_unpicklable_object" 48 ]; 49 50 pythonImportsCheck = [ 51 "diskcache" 52 ]; 53 54 meta = with lib; { 55 description = "Disk and file backed persistent cache"; 56 homepage = "http://www.grantjenks.com/docs/diskcache/"; 57 license = licenses.asl20; 58 maintainers = with maintainers; [ costrouc ]; 59 }; 60}