1{ lib 2, appdirs 3, attrs 4, buildPythonPackage 5, bson 6, cattrs 7, fetchFromGitHub 8, itsdangerous 9, poetry-core 10, pytestCheckHook 11, pythonOlder 12, pyyaml 13, requests 14, requests-mock 15, rich 16, timeout-decorator 17, ujson 18, url-normalize 19}: 20 21buildPythonPackage rec { 22 pname = "requests-cache"; 23 version = "0.8.1"; 24 format = "pyproject"; 25 26 disabled = pythonOlder "3.7"; 27 28 src = fetchFromGitHub { 29 owner = "reclosedev"; 30 repo = "requests-cache"; 31 rev = "v${version}"; 32 sha256 = "sha256-HzOcPWmvUhqPtb/7Mnw6wWY7a4CwGRwPgq+7QoHJAc8="; 33 }; 34 35 nativeBuildInputs = [ 36 poetry-core 37 ]; 38 39 propagatedBuildInputs = [ 40 appdirs 41 attrs 42 bson 43 cattrs 44 itsdangerous 45 pyyaml 46 requests 47 ujson 48 url-normalize 49 ]; 50 51 checkInputs = [ 52 pytestCheckHook 53 requests-mock 54 rich 55 timeout-decorator 56 ]; 57 58 # Integration tests require local DBs 59 pytestFlagsArray = [ "tests/unit" ]; 60 61 pythonImportsCheck = [ "requests_cache" ]; 62 63 meta = with lib; { 64 description = "Persistent cache for requests library"; 65 homepage = "https://github.com/reclosedev/requests-cache"; 66 license = licenses.bsd3; 67 maintainers = with maintainers; [ fab ]; 68 }; 69}