# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Magnus Sandin <magnus.sandin@valitron.se>
pkgname=py3-pychromecast
pkgver=14.0.5
pkgrel=1
pkgdesc="Python module to talk to Google Chromecast"
url="https://github.com/home-assistant-libs/pychromecast"
arch="noarch"
license="MIT"
depends="
	py3-casttube
	py3-protobuf
	py3-zeroconf
	python3
	"
makedepends="
	py3-build
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/P/PyChromecast/PyChromecast-$pkgver.tar.gz"
options="!check" # No tests
builddir="$srcdir/PyChromecast-$pkgver"

provides="py3-chromecast=$pkgver-r$pkgrel" # Backwards compatibility
replaces="py3-chromecast" # Backwards compatibility

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

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
9627ad6f67b4625e44b56f72e05e0a673396b8c89a542de896beb14f186c86974397878eab8ff42652b987a0524541575797ebea18098a8cdaadf78f9bdfa6d7  PyChromecast-14.0.5.tar.gz
"
