# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-tcxreader
_pkgorig=tcxreader
pkgver=0.4.11
pkgrel=0
pkgdesc="tcxparser is a reader / parser for Garmin’s TCX file format"
url="https://github.com/alenrajsp/tcxreader"
arch="noarch"
license="MIT"
depends="python3"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-poetry-core"
subpackages="$pkgname-pyc"
source="https://github.com/alenrajsp/tcxreader/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$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 -n auto
}

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

sha512sums="
a53818f9da90a4521be69723b0fc46e8868cb24fb32fa9d7451bd8c3e32fc805fee71cd6466b9a3ceb7fb3d2a1d266cc107bb84425c395f40c98541ead50472b  tcxreader-0.4.11.tar.gz
"
