# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-jaraco.text
pkgver=4.0.0
pkgrel=1
pkgdesc="Module for text manipulation"
url="https://github.com/jaraco/jaraco.text"
arch="noarch"
license="MIT"
depends="
	py3-autocommand
	py3-inflect
	py3-jaraco.context
	py3-jaraco.functools
	py3-more-itertools
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-autocommand py3-inflect py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/j/jaraco_text/jaraco_text-$pkgver.tar.gz"
builddir="$srcdir/jaraco_text-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	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 --ignore testenv
}

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

sha512sums="
240c4f6f3df6916e9015479147474a43ea9e858e22821f53263c1ef42c61336c36a34baa9c7384b9d345cf42e10b7499e2efa3c85178a0c2abc47fcd82b63fb3  jaraco_text-4.0.0.tar.gz
"
