testing/py3-limits: build with gpep517

This commit is contained in:
ptrcnull 2024-08-07 14:45:23 +02:00
parent 770c88f771
commit 758f356b15

View File

@ -2,7 +2,7 @@
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks> # Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=py3-limits pkgname=py3-limits
pkgver=3.13.0 pkgver=3.13.0
pkgrel=0 pkgrel=1
pkgdesc="Rate limiting using various strategies and storage backends such as redis & memcached" pkgdesc="Rate limiting using various strategies and storage backends such as redis & memcached"
url="https://github.com/alisaifee/limits" url="https://github.com/alisaifee/limits"
arch="noarch" arch="noarch"
@ -11,7 +11,7 @@ depends="
py3-deprecated py3-deprecated
python3 python3
" "
makedepends="py3-setuptools" makedepends="py3-setuptools py3-gpep517"
checkdepends=" checkdepends="
py3-flaky py3-flaky
py3-mongo py3-mongo
@ -22,7 +22,7 @@ checkdepends="
py3-redis py3-redis
" "
subpackages="$pkgname-pyc" subpackages="$pkgname-pyc"
options="!check" # most tests are integration with db connections, assume all connectors installed options="!check" # most tests are integration with db connections, assume all connectors installed
source=" source="
https://github.com/alisaifee/limits/archive/refs/tags/$pkgver/limits-$pkgver.tar.gz https://github.com/alisaifee/limits/archive/refs/tags/$pkgver/limits-$pkgver.tar.gz
@ -31,17 +31,22 @@ source="
builddir="$srcdir/limits-$pkgver" builddir="$srcdir/limits-$pkgver"
build() { build() {
python3 setup.py build gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
} }
check() { 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 \
-m 'not benchmark and not etcd and not integration and not memcached' \ -m 'not benchmark and not etcd and not integration and not memcached' \
-k 'not aio and not Storage and not strategy' -v -k 'not aio and not Storage and not strategy' -v
} }
package() { package() {
python3 setup.py install --prefix=/usr --root="$pkgdir" gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
} }
sha512sums=" sha512sums="