# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-inflect
pkgver=7.4.0
pkgrel=0
pkgdesc="Correctly generate plurals, singular nouns, ordinals, indefinite articles; convert numbers to words"
url="https://github.com/jaraco/inflect"
arch="noarch"
license="MIT"
depends="py3-more-itertools py3-typeguard"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/i/inflect/inflect-$pkgver.tar.gz"
builddir="$srcdir/inflect-$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="
fe3658a2f4c9303db90604268a525112c6a67f66ed37f6fbe76cd04a008658362e682413297dc1fcae6e6a0415098f3adaf0f205b781e1e24a050f59c9dc9021  inflect-7.4.0.tar.gz
"
