1{ 2 lib, 3 botocore, 4 buildPythonPackage, 5 fetchPypi, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9 setuptools, 10 setuptools-scm, 11}: 12 13buildPythonPackage rec { 14 pname = "aws-secretsmanager-caching"; 15 version = "1.1.2"; 16 pyprject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 pname = "aws_secretsmanager_caching"; 22 inherit version; 23 hash = "sha256-hhdo+I1yA/pLA+YFDFi8Ekrv27xQLpxiqXh1+4XqteA="; 24 }; 25 26 patches = [ 27 # Remove coverage tests from the pytest invocation in setup.cfg. 28 ./remove-coverage-tests.patch 29 ]; 30 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace-fail "'pytest-runner'," "" 34 ''; 35 36 build-system = [ setuptools-scm ]; 37 38 dependencies = [ 39 botocore 40 setuptools # Needs pkg_resources at runtime. 41 ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 disabledTestPaths = [ 46 # Integration tests require networking. 47 "test/integ" 48 ]; 49 50 disabledTests = lib.optionals (pythonAtLeast "3.12") [ 51 # TypeError: 'float' object cannot be interpreted as an integer 52 "test_calls_hook_binary" 53 "test_calls_hook_string" 54 "test_get_secret_binary" 55 "test_get_secret_string" 56 "test_invalid_json" 57 "test_missing_key" 58 "test_string_with_additional_kwargs" 59 "test_string" 60 "test_valid_json_with_mixed_args" 61 "test_valid_json_with_no_secret_kwarg" 62 "test_valid_json" 63 ]; 64 65 pythonImportsCheck = [ "aws_secretsmanager_caching" ]; 66 67 meta = with lib; { 68 description = "Client-side AWS secrets manager caching library"; 69 homepage = "https://github.com/aws/aws-secretsmanager-caching-python"; 70 changelog = "https://github.com/aws/aws-secretsmanager-caching-python/releases/tag/v${version}"; 71 longDescription = '' 72 The AWS Secrets Manager Python caching client enables in-process caching of secrets for Python applications. 73 ''; 74 license = licenses.asl20; 75 maintainers = with maintainers; [ tomaskala ]; 76 }; 77}