summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 70c97ae0c3c0bcb74307bceb813662d2b4e8889e (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
# Maintainer: Mohamed Amine Zghal (medaminezghal) <medaminezghal at outlook dot com>

_name=livekit-api
pkgname=python-$_name
pkgver=1.2.1
pkgrel=1
pkgdesc='Python Server API for LiveKit.'
arch=('any')
_repo='https://github.com/livekit/python-sdks'
url='$_repo/tree/main/livekit-api'
license=('Apache-2.0')
depends=('python' 'python-pyjwt' 'python-aiohttp' 'python-protobuf' 'python-livekit-protocol')
makedepends=('python-hatchling' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest')
source=("$_repo/archive/refs/tags/api-v$pkgver.tar.gz")
sha256sums=('21f92515a98e43de0da496c359e025fa67e209c9612236bc6844fd3b256a4838')

build() {
  cd "$srcdir"/python-sdks-${_name//livekit-/}-v$pkgver
  python -m build --wheel --no-isolation $_name
}

check() {
  local pytest_options=(
    -vv
    --disable-warnings
  )
  cd "$srcdir"/python-sdks-${_name//livekit-/}-v$pkgver
  PYTHONPATH=$PWD/$_name pytest "${pytest_options[@]}" tests/${_name//livekit-/}
}

package() {
  cd "$srcdir"/python-sdks-${_name//livekit-/}-v$pkgver
  python -m installer --destdir="$pkgdir" $_name/dist/*.whl
}