summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 05d39fb046d19db22c215c5e6a0a271c2a8eefb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: Darkfish Tech <arch at darkfish dot com dot au>

_pyname=okta-jwt-verifier
_upstream_name=okta-jwt-verifier-python
_whl_name=${_pyname//-/_}
pkgname="python-${_pyname}"
pkgver=0.5.0
pkgrel=1
pkgdesc='Okta JWT Verifier for Python'
arch=('any')
license=('Apache-2.0')
url="https://github.com/okta/okta-jwt-verifier-python"

depends=(
  'python'
  'python-acachecontrol'
  'python-pyjwt'
  'python-requests'
  'python-retry' # This package installs retry2
)
makedepends=(
  'python-build'
  'python-installer'
  'python-poetry-core'
  'python-setuptools'
)
checkdepends=(
  'python-cryptography'
  'python-pytest'
  'python-pytest-asyncio'
  'python-pytest-mock'
)

source=("${_pyname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
b2sums=('c3b779f019770c5c84023002033bdec3760d6f33de2ac0d9903703f943390a6bc304255b6a3b1fcd76b9abc08e97469bd0f95949755c25280af86059789733b0')


build() {
  cd "$_upstream_name-$pkgver"

  python -m build --wheel --no-isolation
}

check() {
  cd "$_upstream_name-$pkgver"

  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer "dist/$_whl_name-$pkgver"-*.whl
  # Run tests, integration tests are automatically skipped if the required environment variables are not set
  test-env/bin/python -m pytest -v tests
}

package() {
  cd "$_upstream_name-$pkgver"

  python -m installer --destdir="$pkgdir" "dist/$_whl_name-$pkgver"-*.whl

  install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et: