# Contributor: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
# Maintainer: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
pkgname=py3-imaplib2
_pyname=imaplib2
pkgver=3.6
pkgrel=1
pkgdesc="Threaded Python IMAP4 client"
url="https://github.com/jazzband/imaplib2/"
arch="noarch"
license="MIT"
depends="
	python3
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jazzband/imaplib2/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

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

check() {
	PYTHONPATH=. pytest
}

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

sha512sums="
af2c37d2a3f871dde9055c4ae3b1c5da9dad47b5a0086308c1e32426aac8cd349781c70bec50900e82bfec95666c73b2a70784f38a7d18d927c17980a1846645  py3-imaplib2-3.6.tar.gz
"
