testing/py3-diskcache: build with gpep517

This commit is contained in:
ptrcnull 2024-08-06 14:34:32 +02:00
parent aacd69c557
commit c28cac07b2

View File

@ -2,32 +2,37 @@
# Maintainer:
pkgname=py3-diskcache
pkgver=5.6.3
pkgrel=1
pkgrel=2
pkgdesc="disk caching implementation"
options="!check" # test_incr_update_keyerror fails
url="https://grantjenks.com/docs/diskcache/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest py3-pytest-xdist py3-mock py3-django"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/grantjenks/python-diskcache/archive/v$pkgver.tar.gz"
builddir="$srcdir"/python-diskcache-$pkgver
options="!check" # test_incr_update_keyerror fails
replaces="py-diskcache" # Backwards compatibility
provides="py-diskcache=$pkgver-r$pkgrel" # Backwards compatibility
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m 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="