# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=pass-git-helper
pkgver=3.3.0
pkgrel=0
pkgdesc="git credential helper interfacing with pass, the standard unix password manager."
url="https://github.com/languitar/pass-git-helper"
arch="noarch"
license="LGPL-3.0-only"
depends="python3 py3-xdg"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-cov py3-pytest-mock"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/languitar/pass-git-helper/archive/v$pkgver.tar.gz"

provides="py3-pass-git-helper=$pkgver-r$pkgrel"
replaces="py3-pass-git-helper"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --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="
80805da873fe7acf3e7e790f6dae2bce75d6455eed7767f636e30deea345a641dffd4c49c0c02c3b209ce35eecb7c4db9ec8d97eba0462abd6a0593ef10d53e4  pass-git-helper-3.3.0.tar.gz
"
