1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 boto3,
7 six,
8 pyyaml,
9 mock,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "serverlessrepo";
15 version = "0.1.10";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "671f48038123f121437b717ed51f253a55775590f00fbab6fbc6a01f8d05c017";
23 };
24
25 propagatedBuildInputs = [
26 six
27 boto3
28 pyyaml
29 ];
30
31 nativeCheckInputs = [
32 pytestCheckHook
33 mock
34 ];
35
36 postPatch = ''
37 substituteInPlace setup.py \
38 --replace "pyyaml~=5.1" "pyyaml" \
39 --replace "boto3~=1.9, >=1.9.56" "boto3"
40 '';
41
42 enabledTestPaths = [ "tests/unit" ];
43
44 pythonImportsCheck = [ "serverlessrepo" ];
45
46 meta = with lib; {
47 homepage = "https://github.com/awslabs/aws-serverlessrepo-python";
48 description = "Helpers for working with the AWS Serverless Application Repository";
49 longDescription = ''
50 A Python library with convenience helpers for working with the
51 AWS Serverless Application Repository.
52 '';
53 license = licenses.asl20;
54 maintainers = with maintainers; [ dhkl ];
55 };
56}