aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-redis/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-redis/APKBUILD')
-rw-r--r--community/py3-redis/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/py3-redis/APKBUILD b/community/py3-redis/APKBUILD
new file mode 100644
index 00000000000..3580f5e7f79
--- /dev/null
+++ b/community/py3-redis/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Eivind Uggedal <eu@eju.no>
+pkgname=py3-redis
+_pkgname=redis
+pkgver=5.0.3
+pkgrel=1
+pkgdesc="Python3 client for Redis key-value store"
+url="https://github.com/andymccurdy/redis-py"
+arch="noarch"
+license="MIT"
+depends="py3-hiredis"
+makedepends="py3-setuptools py3-gpep517 py3-wheel"
+checkdepends="py3-pytest py3-mock redis"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+options="!check" # tests fail due to old version + disabled proprietary redis features
+
+replaces="py-redis" # Backwards compatibility
+provides="py-redis=$pkgver-r$pkgrel" # Backwards compatibility
+
+# secfixes:
+# 4.5.4-r0:
+# - CVE-2023-28858
+# - CVE-2023-28859
+
+build() {
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
+}
+
+check() {
+ redis-server --dir "$builddir" &
+ trap "kill $!" EXIT
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ .testenv/bin/python3 -m pytest
+}
+
+package() {
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
+}
+
+sha512sums="
+c5a5420c6b64f8435bc6cdde51ff093a3616f28393b3a106b21801f389939fdfaf884512b05eac9643e8d566b2f8c54046f20b1b94e61e022f79cff2a91e0227 py3-redis-5.0.3.tar.gz
+"