# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_pyname=PyDispatcher
pkgname=py3-pydispatcher
pkgver=2.0.7
pkgrel=3
pkgdesc="Loosely-coupled message passing between Python objects (signal senders and receivers)"
url="https://github.com/mcfletch/pydispatcher"
arch="noarch"
license="BSD-3-Clause"
makedepends="python3-dev py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/P/PyDispatcher/PyDispatcher-$pkgver.tar.gz"
builddir="$srcdir/PyDispatcher-$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 -v
}

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

sha512sums="
cef4b07e7abcbef54b3af12b49a27e40d145f76d5aa51dfcedc38d76d51c4076c605c0b55e05881dc26ac260a583f119864fa4b4e8ab21d156231b07ef418916  PyDispatcher-2.0.7.tar.gz
"
