upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-moto / repos / community-any / PKGBUILD
blobbfb2dc324d9ff67e72e782cc31c72b00632710a2
1 # Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
2 # Contributor: Guillaume Horel <guillaume.horel@gmail.com>
4 pkgname=python-moto
5 _pkgname=moto
6 # https://github.com/spulec/moto/blob/master/CHANGELOG.md
7 pkgver=4.1.9
8 pkgrel=1
9 pkgdesc='Moto is a library to mock out the boto library.'
10 arch=(any)
11 url='https://github.com/spulec/moto'
12 license=(Apache)
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
19          python-jinja
20          # urllib3 is used by cfnresponse.py, not directly by moto - just to make namcap happy
21          python-urllib3)
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.
27 optdepends=(
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"
49         "fix-tests.diff")
50 sha256sums=('d4bb629686b8b92e480f9784316bd0f379b148a5caee7c07aecbde6033a885e1'
51             '21305cdf3d650ced1acb1d0f7dde8760b26e32a94c56a5571e798d6b6976cf5a')
53 prepare() {
54   cd $_pkgname-$pkgver
56   patch -Np1 -i ../fix-tests.diff
59 build() {
60   cd $_pkgname-$pkgver
62   python -m build --wheel --no-isolation
65 check() {
66   cd $_pkgname-$pkgver
68   TZ=UTC pytest tests -m 'not requires_docker'
71 package() {
72   cd $_pkgname-$pkgver
74   python -m installer --destdir="$pkgdir" dist/*.whl