# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-gpxpy
pkgver=1.6.2
pkgrel=1
pkgdesc="Python3 GPX parser"
url="https://github.com/tkrajina/gpxpy"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/g/gpxpy/gpxpy-$pkgver.tar.gz"
builddir="$srcdir/gpxpy-$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 unittest test
}

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

sha512sums="
441b0a0f3c437e7df78aeaa42111e933a161a4e40ff09b3b74cff18f0da533704b207cee9dc870b88515d54296fa559f7ba0d29e8ddad73f3ca07416ffef26c1  gpxpy-1.6.2.tar.gz
"
