maintainer="Bart Ribbers <bribbers@disroot.org>"
pkgname=py3-ovos-backend-client
pkgver=1.0.0
pkgrel=0
pkgdesc="Unofficial python api for interaction with https://api.mycroft.ai"
url="https://github.com/OpenVoiceOS/ovos-backend-client"
arch="noarch"
license="Apache-2.0"
depends="
	py3-json-database
	py3-oauthlib
	py3-ovos-bus-client
	py3-ovos-plugin-manager
	py3-ovos-utils
	py3-timezonefinder
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/OpenVoiceOS/ovos-backend-client/archive/V$pkgver/ovos-backend-client-$pkgver.tar.gz"
builddir="$srcdir/ovos-backend-client-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
9e2d983c7a86504aef51dd209c74ffbb32221d6a47ccebdb9fe09608cd6fb76f4bff1f7f649106a5d6ac398f1f8ac0fe3d70792f47db2a1d76121fce01a5a56d  ovos-backend-client-1.0.0.tar.gz
"
