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