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