# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py3-pygithub
_pkgname=PyGithub
pkgver=2.3.0
pkgrel=1
pkgdesc="Typed interactions with the GitHub API v3"
url="https://github.com/PyGithub/PyGithub"
arch="noarch"
license="LGPL-3.0-or-later"
depends="
	py3-cryptography
	py3-deprecated
	py3-jwt
	py3-pynacl
	py3-requests
	py3-typing-extensions
	py3-urllib3
	python3
	"
checkdepends="
	py3-httpretty
	py3-pytest
	"
makedepends="
	py3-gpep517
	py3-setuptools_scm
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://github.com/PyGithub/PyGithub/archive/v$pkgver/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/PyGithub-$pkgver-py3-none-any.whl
}

sha512sums="
aa0496b57550923fa304bd22100ed480cd2a9e909e9030014252e9106f7bde7ba16b1f693b88c9f17c672e58e1ae9a2a5f11adcf97fc6f4c7258eacbaf6fafc0  PyGithub-2.3.0.tar.gz
"
