mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
63 lines
1.6 KiB
Text
63 lines
1.6 KiB
Text
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
pkgname=py3-django-redis
|
|
_pyname=django-redis
|
|
pkgver=6.0.0
|
|
pkgrel=0
|
|
arch="noarch"
|
|
pkgdesc="Full featured redis cache backend for Django."
|
|
url="https://pypi.python.org/project/django-redis"
|
|
license="BSD-3-Clause"
|
|
depends="
|
|
py3-django
|
|
"
|
|
makedepends="
|
|
py3-setuptools
|
|
py3-wheel
|
|
py3-gpep517
|
|
py3-redis
|
|
"
|
|
checkdepends="
|
|
py3-pytest
|
|
py3-pytest-cov
|
|
py3-pytest-mock
|
|
py3-pytest-xdist
|
|
py3-lz4
|
|
py3-msgpack
|
|
valkey
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/jazzband/django-redis/archive/refs/tags/$pkgver.tar.gz"
|
|
builddir="$srcdir"/$_pyname-$pkgver
|
|
subpackages="$pkgname-pyc"
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
valkey-server &
|
|
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
|
.testenv/bin/python3 -m installer .dist/*.whl
|
|
|
|
# tests/test_backend.py::TestDjangoRedisCache::test_delete_pattern_with_settings_default_scan_count: see
|
|
# https://github.com/django/asgiref/issues/485
|
|
PYTHONPATH=tests \
|
|
.testenv/bin/python3 -m pytest -v \
|
|
--deselect tests/test_backend.py::TestDjangoRedisCache::test_delete_pattern_with_settings_default_scan_count \
|
|
|| local FAIL=true
|
|
pkill valkey-server
|
|
if [ "$FAIL" = "true" ]; then
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
.dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
b43f536b7068a3d43eaeae86261107b1ab1f844858e0a42f6f01bf3ac1c1b43342b43ac9cdea6f87ad3e7e1c9044f4f7f3cb1ddb1f88982ca937f6b4de8ddd3a py3-django-redis-6.0.0.tar.gz
|
|
"
|