testing/thefuck: build with gpep517, enable tests

This commit is contained in:
ptrcnull 2024-08-31 16:24:44 +02:00
parent 958e2a384a
commit d00b7757cb

View File

@ -2,28 +2,35 @@
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=thefuck
pkgver=3.32
pkgrel=4
pkgrel=5
pkgdesc="The Fuck is a magnificent app that corrects errors in previous console commands."
url="https://github.com/nvbn/thefuck"
arch="noarch"
license="MIT"
depends="py3-colorama py3-six py3-decorator py3-psutil py3-pyte"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest py3-pytest-mock"
subpackages="$pkgname-pyc"
source="thefuck-$pkgver.tar.gz::https://github.com/nvbn/thefuck/archive/$pkgver.tar.gz
0420442e778dd7bc53bdbdb50278eea2c207dc74.patch
"
check() {
python3 setup.py check
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
build() {
python3 setup.py build
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_utils.py::TestGetValidHistoryWithoutCurrent
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="