# Contributor: Magnus Sandin <magnus.sandin@valitron.se>
# Maintainer: Magnus Sandin <magnus.sandin@valitron.se>
pkgname=py3-python-osc
pkgver=1.9.3
pkgrel=0
pkgdesc="Open Sound Control server and client implementations in pure python"
url="https://github.com/attwad/python-osc"
arch="noarch"
license="Unlicense"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgver-$pkgver.tar.gz::https://github.com/attwad/python-osc/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/python-osc-$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 unittest discover
}

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

	rm -r "$pkgdir"/usr/lib/python*/site-packages/pythonosc/test
}

sha512sums="
792fa9cfa6f56b8975174f42718db257b99b586fae1e14f24c5bbf673dbfaafd8374b5fcee060db890f02e990658b49ed3ec8942f863cf4e394a3f214455946f  1.9.3-1.9.3.tar.gz
"
