testing/cpplint: switch to gpep517

This commit is contained in:
ptrcnull 2024-01-16 23:11:58 +01:00
parent 0a0c396bc1
commit aa28f66f95
No known key found for this signature in database
GPG Key ID: 411F7B30801DD9CA

View File

@ -2,13 +2,12 @@
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=cpplint
pkgver=1.6.1
pkgrel=1
pkgrel=2
pkgdesc="Static code checker for C++"
url="https://github.com/cpplint/cpplint"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
checkdepends="py3-pytest py3-pytest-runner py3-pytest-cov py3-testfixtures"
subpackages="$pkgname-pyc"
source="https://github.com/cpplint/cpplint/archive/refs/tags/$pkgver/cpplint-$pkgver.tar.gz
@ -17,15 +16,20 @@ source="https://github.com/cpplint/cpplint/archive/refs/tags/$pkgver/cpplint-$pk
"
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
pytest
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="