# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
pkgname=py3-google-auth-httplib2
_pyname=google-auth-httplib2
pkgver=0.2.0
pkgrel=1
pkgdesc="Google Authentication Library: httplib2 transport"
url="https://github.com/googleapis/google-auth-library-python-httplib2"
arch="noarch"
license="Apache-2.0"
depends="
	py3-google-auth
	py3-httplib2
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-flask
	py3-pytest
	py3-pytest-localserver
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/g/google-auth-httplib2/google-auth-httplib2-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$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
}

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

sha512sums="
82ffe87172056cd6d15e3d5f12c155ff9e09fdea9d8e6385fd3ddc2db374df41a74dcfb3aff3df1d046d2b537f0a98ee9b5c7dd7818d2274af9462df48e7bdf8  google-auth-httplib2-0.2.0.tar.gz
"
