# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=jellyfin-mpv-shim
pkgver=2.8.0
pkgrel=0
pkgdesc="MPV Cast Client for Jellyfin "
url="https://github.com/jellyfin/jellyfin-mpv-shim"
arch="noarch"
license="MIT"
depends="
	mpv
	py3-jellyfin-apiclient-python
	py3-mpv
	py3-python-mpv-jsonipc
	py3-requests
	python3-tkinter
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/j/jellyfin-mpv-shim/jellyfin-mpv-shim-$pkgver.tar.gz"
options="!check" # No tests

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="
70d1e95962b0103035bfbe1e3cab6f07c253a1909b5db612038a2635161f9b0d0529ec221481d9bf73f8fdce62dc3e27f76b7aaeb9f754854dd5527e408468ed  jellyfin-mpv-shim-2.8.0.tar.gz
"
