# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-pyro4
_pyname=Pyro4
pkgver=4.82
pkgrel=3
pkgdesc="Python remote objects"
url="http://pyro4.readthedocs.io/"
arch="noarch"
license="MIT"
depends="py3-serpent"
makedepends="python3 py3-setuptools py3-gpep517 py3-wheel"
checkdepends="py3-msgpack py3-dill py3-cloudpickle"
_pypiprefix="${_pyname%"${_pyname#?}"}"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir=$srcdir/$_pyname-$pkgver
options="!check" # does not support py311 anyway https://github.com/irmen/Pyro4/issues/246

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

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

check() {
	python3 setup.py test
}

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

sha512sums="
f5916ce37ec52d8cd23bece79325480140621ac8412febb4877a32b1ce54502ef17d20bf591dc30eb20e9619741548b30a78165937d5e69e8d1911d95a23b1e1  Pyro4-4.82.tar.gz
"
