testing/py3-openwisp-utils: build with gpep517

This commit is contained in:
ptrcnull 2024-08-07 15:31:56 +02:00
parent 8ab1da8aff
commit 0abda380ff

View file

@ -3,7 +3,7 @@
_pkgname=openwisp-utils
pkgname="py3-$_pkgname"
pkgver=1.0.4
pkgrel=3
pkgrel=4
pkgdesc="Python and Django utilities shared between different openwisp modules"
url="https://github.com/openwisp/openwisp-utils"
arch="noarch"
@ -20,22 +20,27 @@ depends="
checkdepends="
py3-openwisp-controller
"
makedepends="py3-setuptools_scm"
makedepends="py3-setuptools_scm py3-gpep517"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/openwisp/openwisp-utils/archive/refs/tags/$pkgver.tar.gz"
options="!check" # circular dependency caused by testing suite (controller <=> utils)
builddir="$srcdir/$_pkgname-$pkgver"
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 runtests.py
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 runtests.py
}
package() {
python3 setup.py install --root "$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="