maintainer="Michał Polański <michal@polanski.me>"
pkgname=pyinfra
pkgver=3.1.1
pkgrel=0
pkgdesc="Python-based infrastructure automation"
url="https://github.com/pyinfra-dev/pyinfra"
license="MIT"
arch="noarch"
depends="
	py3-click
	py3-dateutil
	py3-distro
	py3-gevent
	py3-jinja2
	py3-packaging
	py3-paramiko
	py3-typeguard
	py3-typing-extensions
	"
makedepends="py3-gpep517 py3-installer py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/pyinfra-dev/pyinfra/archive/v$pkgver/pyinfra-$pkgver.tar.gz"

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

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/pyinfra-$pkgver-py2.py3-none-any.whl

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/tests/ # remove tests
}

sha512sums="
6832b1bf57cbcd1ebd49a101a0a2584b82067de6c0b9f0028884f7d82a8394e16cb7a9ccd071ce53c3525da9ad9d8d083b3303f434e00d5137f798ccdf5cfd5c  pyinfra-3.1.1.tar.gz
"
