# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-iso639
_pyname=iso639
pkgver=0.4.5
pkgrel=1
pkgdesc="Python library for ISO 639 standard"
arch="noarch"
url="https://github.com/noumar/iso639"
license="AGPL-3.0-only"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pycountry
	"
options="!check" # Failing testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/noumar/iso639/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

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

check() {
	PYTHONPATH="$builddir" python3 ./tests/tests.py
}

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

sha512sums="
6201535804d7d1af77f1f2961d8eb1c2fae323dc5d4361b44e23caa834de1dcb9abd257cda4068f12a1a2984000edfa49cb852ecef5baee2d78d9c9e587202e4  py3-iso639-0.4.5.tar.gz
"
