# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-unpaddedbase64
pkgver=2.1.0
pkgrel=7
pkgdesc="Base64 Encoding and Decoding without = padding"
url="https://github.com/matrix-org/python-unpaddedbase64"
arch="noarch"
license="Apache-2.0"
makedepends="
	py3-gpep517
	py3-poetry-core
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/matrix-org/python-unpaddedbase64/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-unpaddedbase64-$pkgver"

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

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

sha512sums="
9c7c2dd6e52ffae2bf076ccf9e1e2ea9a53cbef083c23f640cc2f3f5c49ceee0c92c8abe0469e10d80b7c9e74d69b2b06111b1c4204b4cb1788ee3fffcea6e11  py3-unpaddedbase64-2.1.0.tar.gz
"
