# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
pkgname=py3-google-auth
_pyname=google_auth
pkgver=2.39.0
pkgrel=0
pkgdesc="Google authentication library for Python."
url="https://google-auth.readthedocs.io/en/latest/"
arch="noarch"
license="Apache-2.0"
depends="
	python3
	py3-cachetools
	py3-asn1-modules
	py3-rsa
	py3-six
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-aiohttp
	py3-aioresponses
	py3-certifi
	py3-cryptography
	py3-flask
	py3-freezegun
	py3-grpcio
	py3-jwt
	py3-mock
	py3-oauth2client
	py3-openssl
	py3-pytest
	py3-pytest-aiohttp
	py3-pytest-cov
	py3-pytest-localserver
	py3-pyu2f
	py3-requests
	py3-responses
	py3-urllib3
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/g/google_auth/google_auth-$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
	# https://github.com/googleapis/google-auth-library-python/issues/1665
	.testenv/bin/python3 -m pytest -k 'not test_success'
}

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

sha512sums="
3bee0b649fdec2e9972afc47cd863f58c2b5e451a3970d85674d3d0572b1cbfd39d355af8c7648bb79aea2b41bd177da03dd01cb146681ed651de2d06bf355c0  google_auth-2.39.0.tar.gz
"
