about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aws-secretsmanager-caching/default.nix
blob: 7e54c030bf1e6891a2eb7b10afbb2227e9d06585 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, setuptools
, setuptools-scm
, botocore
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "aws_secretsmanager_caching";
  version = "1.1.1.5";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "5cee2762bb89b72f3e5123feee8e45fbe44ffe163bfca08b28f27b2e2b7772e1";
  };

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    botocore
    setuptools  # Needs pkg_resources at runtime.
  ];

  patches = [
    # Remove coverage tests from the pytest invocation in setup.cfg.
    ./remove-coverage-tests.patch
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pytest-runner'," ""
  '';

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTestPaths = [
    # Integration tests require networking.
    "test/integ"
  ];

  pythonImportsCheck = [
    "aws_secretsmanager_caching"
  ];

  meta = with lib; {
    description = "Client-side AWS secrets manager caching library";
    homepage = "https://github.com/aws/aws-secretsmanager-caching-python";
    changelog = "https://github.com/aws/aws-secretsmanager-caching-python/releases/tag/v${version}";
    longDescription = ''
      The AWS Secrets Manager Python caching client enables in-process caching of secrets for Python applications.
    '';
    license = licenses.asl20;
    maintainers = with maintainers; [ tomaskala ];
  };
}