maintainer="Michał Polański <michal@polanski.me>"
pkgname=pyinfra
pkgver=3.2
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="
9e4853c02efb4a9e92439ab05509c440ff96048f03ff3165dbfbf8e5fcb00124d7b06ca4a0a75861e1f9a37551e76f57ff5a0ebacae925865feb413ac62d8c1e  pyinfra-3.2.tar.gz
"
