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