# Automatically generated by apkbuild-pypi, template 4
# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=py3-gtkspellcheck
pkgver=5.0.3
pkgrel=0
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=pygtkspellcheck
pkgdesc="Simple but quite powerful spellchecking library for GTK written in pure Python"
url="https://pypi.org/project/pygtkspellcheck/"
arch="noarch"
license="GPL-3.0-or-later"
depends="py3-enchant py3-gobject3"
makedepends="py3-gpep517 py3-setuptools py3-wheel py3-poetry-core"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/p/pygtkspellcheck/pygtkspellcheck-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
options="!check" # no tests

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="
1476a1405ea7b13e4e122229d48b6d4150f92765e85c06d17fc63853cf31321f598d7d54826c1b37ee0c18007cd9b18cf803ce35715c8c6f8338a2e267c3fd78  pygtkspellcheck-5.0.3.tar.gz
"