1 # Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
2 # Contributor: Guillaume Horel <guillaume.horel@gmail.com>
6 # https://github.com/spulec/moto/blob/master/CHANGELOG.md
9 pkgdesc='Moto is a library to mock out the boto library.'
11 url='https://github.com/spulec/moto'
13 # NOTE: Keep the order of dependencies matching setup.cfg
14 # setup.cfg includes setuptools, which is a work around for missing dependencies in aws-xray-sdk [1].
15 # I use the correct dependency in python-aws-xray-sdk, so python-setuptools is not needed here.
16 # [1] https://github.com/spulec/moto/pull/4142
17 depends=(python python-boto3 python-botocore python-cryptography python-requests python-xmltodict
18 python-werkzeug python-dateutil python-responses
20 # urllib3 is used by cfnresponse.py, not directly by moto - just to make namcap happy
22 makedepends=(python-build python-installer python-setuptools python-wheel)
23 # See reqquirements-test.txt, excluding pytest-cov
24 checkdepends=(python-pytest python-pytest-ordering python-sure python-freezegun)
25 # Check extras_require in upstream `setup.cfg` for optional dependencies.
26 # Note that ecdsa is excluded as it is pinned for jose and not used by moto.
28 'python-yaml: for apigatewayv2, cloudformation, s3 and ssm'
29 'python-jose: for apigateway, cloudformation and cognitoidp'
30 'python-openapi-spec-validator: for apigateway and cloudformation'
31 # SNS and SQS still uses docker indirectly, while upstream explicitly removes them
32 # https://github.com/spulec/moto/pull/4094
33 'python-docker: for awslambda, batch, cloudformation, dynamodb and dynamodbstreams'
34 'python-graphql-core: For appsync and cloudformation'
35 'python-jsondiff: for iotdata and cloudformation'
36 'python-aws-xray-sdk: for xray and cloudformation'
37 'python-cfn-lint: for cloudformation'
38 'python-sshpubkeys: for cloudformation, directoryservice, ebs, ec2, efs, eks and route53resolver'
39 'python-pyparsing: for glue and cloudformation'
40 'python-py-partiql-parser: for cloudformation and s3'
41 'python-flask: for moto_server'
42 'python-flask-cors: for moto_server'
44 checkdepends+=(python-yaml python-jose python-openapi-spec-validator python-docker
45 python-graphql-core python-jsondiff python-aws-xray-sdk
46 python-cfn-lint python-sshpubkeys python-pyparsing python-py-partiql-parser
47 python-flask python-flask-cors)
48 source=("https://files.pythonhosted.org/packages/source/m/moto/moto-${pkgver}.tar.gz"
50 sha256sums=('d4bb629686b8b92e480f9784316bd0f379b148a5caee7c07aecbde6033a885e1'
51 '21305cdf3d650ced1acb1d0f7dde8760b26e32a94c56a5571e798d6b6976cf5a')
56 patch -Np1 -i ../fix-tests.diff
62 python -m build --wheel --no-isolation
68 TZ=UTC pytest tests -m 'not requires_docker'
74 python -m installer --destdir="$pkgdir" dist/*.whl