1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, setuptools
6, setuptools-scm
7, botocore
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "aws_secretsmanager_caching";
13 version = "1.1.1.5";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "5cee2762bb89b72f3e5123feee8e45fbe44ffe163bfca08b28f27b2e2b7772e1";
21 };
22
23 nativeBuildInputs = [
24 setuptools-scm
25 ];
26
27 propagatedBuildInputs = [
28 botocore
29 setuptools # Needs pkg_resources at runtime.
30 ];
31
32 patches = [
33 # Remove coverage tests from the pytest invocation in setup.cfg.
34 ./remove-coverage-tests.patch
35 ];
36
37 postPatch = ''
38 substituteInPlace setup.py \
39 --replace "'pytest-runner'," ""
40 '';
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 ];
45
46 disabledTestPaths = [
47 # Integration tests require networking.
48 "test/integ"
49 ];
50
51 pythonImportsCheck = [
52 "aws_secretsmanager_caching"
53 ];
54
55 meta = with lib; {
56 description = "Client-side AWS secrets manager caching library";
57 homepage = "https://github.com/aws/aws-secretsmanager-caching-python";
58 changelog = "https://github.com/aws/aws-secretsmanager-caching-python/releases/tag/v${version}";
59 longDescription = ''
60 The AWS Secrets Manager Python caching client enables in-process caching of secrets for Python applications.
61 '';
62 license = licenses.asl20;
63 maintainers = with maintainers; [ tomaskala ];
64 };
65}