# Contributor: Bart Ribbers <bribbers@disroot.org>
maintainer="Bart Ribbers <bribbers@disroot.org>"
pkgname=py3-pyee
pkgver=12.1.1
pkgrel=0
pkgdesc="A port of node.js's EventEmitter to Python"
url="https://github.com/jfhbrook/pyee"
arch="noarch"
license="MIT"
depends="
	py3-async_generator
	py3-trio
	py3-twisted
	py3-vcversioner
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-mock
	py3-pytest-asyncio
	py3-pytest-trio
	pytest
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/p/pyee/pyee-$pkgver.tar.gz"
builddir="$srcdir/pyee-$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="
db3df38f7f031ed305b6a14243512c2c3c6588de094eac35ab5f0fc58cc9210295c5dfa33f0cd871731d39973d2f82eddf67c75bb372d5a1681b2bb099189c1b  pyee-12.1.1.tar.gz
"
