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