archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / awxkit / trunk / PKGBUILD
blob1b2855a04a32147b7dec4447f89adf429f3edd22
1 # Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
3 pkgname=awxkit
4 _pkgname=awx
5 _commit=84f67c7f82f82a8fa9b47b7d64c4288a15f6772c
6 pkgver=22.3.0
7 pkgrel=1
8 pkgdesc="The official command line interface for Ansible AWX"
9 arch=('any')
10 url="https://github.com/ansible/awx"
11 license=('Apache')
12 depends=(
13   'python'
14   'python-pytest'  # unreferenced, required in awxkit/yaml_file.py
15   'python-pyyaml'
16   'python-requests'
17   'python-setuptools'  # unreferenced, required in awxkit/cli/client.py
19 makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-setuptools-scm' 'python-wheel')
20 checkdepends=(
21   'jq'
22   'python-pytest'
23   'python-cryptography'
24   # 'python-websocket-client'  # TODO: needs to be packaged
26 optdepends=(
27   'jq: for formatting'
28   # 'python-websocket-client: for websockets support'  # TODO: needs to be packaged
29   'python-cryptography: for cryptography support'
31 options=(!emptydirs)
32 source=("${_pkgname}::git+https://github.com/ansible/${_pkgname}#tag=$_commit")
33 sha512sums=('SKIP')
35 build() {
36     cd "${_pkgname}/${pkgname}"
37     python -m build --wheel --no-isolation
40 check() {
41     local deselected=(
42       # NOTE: deselect tests that require python-websocket-client
43       --deselect test/test_ws.py::test_explicit_hostname
44       --deselect test/test_ws.py::test_urlparsing
45       # Python 3.11 test failure https://github.com/ansible/awx/issues/13820
46       --deselect test/cli/test_options.py::TestOptions::test_actions_with_primary_key
47     )
48     cd "${_pkgname}/${pkgname}"
49     pytest -vv "${deselected[@]}"
52 package() {
53     cd "${_pkgname}/${pkgname}"
54     python -m installer --destdir="$pkgdir" dist/*.whl