1{ 2 lib, 3 buildPythonPackage, 4 cherrypy, 5 fetchFromGitHub, 6 flit-core, 7 filelock, 8 mock, 9 msgpack, 10 pytestCheckHook, 11 pythonOlder, 12 redis, 13 requests, 14}: 15 16buildPythonPackage rec { 17 pname = "cachecontrol"; 18 version = "0.14.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.7"; 22 23 __darwinAllowLocalNetworking = true; 24 25 src = fetchFromGitHub { 26 owner = "ionrock"; 27 repo = "cachecontrol"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-myyqiUGna+5S2GJGnwZTOfLh49NhjfHAvpUB49dQbgY="; 30 }; 31 32 nativeBuildInputs = [ flit-core ]; 33 34 propagatedBuildInputs = [ 35 msgpack 36 requests 37 ]; 38 39 passthru.optional-dependencies = { 40 filecache = [ filelock ]; 41 redis = [ redis ]; 42 }; 43 44 nativeCheckInputs = [ 45 cherrypy 46 mock 47 pytestCheckHook 48 requests 49 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 50 51 pythonImportsCheck = [ "cachecontrol" ]; 52 53 meta = with lib; { 54 description = "Httplib2 caching for requests"; 55 mainProgram = "doesitcache"; 56 homepage = "https://github.com/ionrock/cachecontrol"; 57 changelog = "https://github.com/psf/cachecontrol/releases/tag/v${version}"; 58 license = licenses.asl20; 59 maintainers = with maintainers; [ dotlambda ]; 60 }; 61}