testing/git-revise: build with gpep517, enable tests

This commit is contained in:
ptrcnull 2024-08-04 23:16:44 +02:00
parent aedbf88ebb
commit cb385c0beb

View File

@ -1,26 +1,34 @@
# Maintainer:
pkgname=git-revise
pkgver=0.7.0
pkgrel=4
pkgrel=5
pkgdesc="Handy tool for doing efficient in-memory commit rebases & fixups with git"
url="https://github.com/mystor/git-revise"
arch="noarch"
license="MIT"
depends="python3 git"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest py3-pytest-xdist py3-tox"
subpackages="$pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mystor/git-revise/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # tests fail to import self when not system installed
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m pytest \
--deselect tests/test_gpgsign.py::test_gpgsign
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="
2c61df0854b20319286aa6bf663b3a1a1bcddb4b8aa144ce7850fe5a32a26ad861898d00b423a7fe7ace60b7964149470ad2c144eed2b3e1119df0c34acbe04d git-revise-0.7.0.tar.gz
"