# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-setuptools-gettext
pkgver=0.1.14
pkgrel=0
pkgdesc="setuptools plugin for building mo files"
url="https://github.com/breezy-team/setuptools-gettext"
arch="noarch"
license="GPL-2.0-or-later"
depends="gettext"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/breezy-team/setuptools-gettext/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/setuptools-gettext-$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
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
642bf26d7e508232d88827037661a98d0576841433a8fdf1f0f25bac2c98d31d967852d138a11ad93dbd5703154737054e214d1846b452e84e5c75be80ea969f  py3-setuptools-gettext-0.1.14.tar.gz
"
