summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 03bb32683e8753830839f175d3cea91053d8848b (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
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer: Darkfish Tech <arch at darkfish dot com dot au>
# Contributor: Chris Snell <chris dot snell at gmail.com>

_pyname=okta
_upstream_name=okta-sdk-python
pkgname="python-${_pyname}"
pkgver=3.4.6
pkgrel=1
pkgdesc='A Python SDK library for the Okta Management APIs'
arch=('any')
license=('Apache-2.0')
url="https://github.com/okta/okta-sdk-python"

depends=(
  'python'
  'python-aenum'
  'python-aiohttp'
  'python-blinker'
  'python-dateutil'
  'python-jwcrypto'
  'python-pycryptodomex'
  'python-pydantic'
  'python-pydash'
  'python-pyjwt'
  'python-requests'
  'python-xmltodict'
  'python-yaml'
)

optdepends=(
  'python-pillow: for image processing support'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
)
checkdepends=(
  'python-pytest'
  'python-pytest-asyncio'
  'python-pytest-cov'
  'python-pytest-mock'
  'python-pytest-randomly'
  'python-pytest-recording'
)

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


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/$_pyname-$pkgver"-*.whl
  # Run tests, excluding integration tests (which require an Okta account and credentials)
  test-env/bin/python -m pytest -v tests -k "not integration"
}

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

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

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

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