# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pykka
pkgver=4.1.1
pkgrel=0
pkgdesc="Concurrency abstractions for Python3 using the actor model"
url="https://pykka.readthedocs.org/"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="
	py3-gpep517
	py3-installer
	py3-poetry-core
	"
checkdepends="
	py3-mock
	py3-pydantic
	py3-pytest
	py3-pytest-mock
	"
subpackages="$pkgname-pyc"
source="https://github.com/jodal/pykka/archive/v$pkgver/pykka-$pkgver.tar.gz"
builddir="$srcdir/pykka-$pkgver"

replaces="py-pykka" # Backwards compatibility
provides="py-pykka=$pkgver-r$pkgrel" # Backwards compatibility

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="
99f8738dbd0a4172e9c8a2cdbfe36335e349f8b0e421ab53ad2869e4250e6c03e69b89eea30e05c015a0203e0e6191b421f23061aa3aab869bb4383cc6ed0d49  pykka-4.1.1.tar.gz
"
