# Automatically generated by apkbuild-pypi, template 3
# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=py3-rpyc
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=rpyc
pkgver=5.3.1
pkgrel=3
pkgdesc="Remote Python Call (RPyC) is a transparent and symmetric distributed computing library"
url="https://pypi.org/project/rpyc/"
arch="noarch"
license="MIT"
depends="python3 py3-plumbum"
makedepends="py3-setuptools py3-gpep517 py3-hatchling py3-installer py3-wheel"
options="net" # needed for check()
subpackages="$pkgname-pyc"
source="$_pkgreal-$pkgver.tar.gz::https://github.com/tomerfiliba-org/rpyc/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare

	# Disable deploy tests, these rely on OpenSSH and require
	# configuring the SSH client manually to accept the host key.
	rm tests/test_deploy.py
}

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

check() {
	cd tests
	PYTHONPATH="$builddir" python -m unittest discover -v
}

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

sha512sums="
a328903c336483f7110cbbff96173ba0b5ae6cf16f6306c624055bd631d914772c42dcfcf48a275b7dc53241f6b10a397ee49f17b8a3c3c8dbee8f42ac784465  rpyc-5.3.1.tar.gz
"
