mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 11:45:18 +03:00
we never use pip in the venv manually made for tests- this might break 1-2 things unexpectedly, but - those should be looked at anyway - this has a severe speedup- even on a desktop machine with nvme, this makes an arbitrary venv go from 2.6s to <100ms(!) to make. a nice small optimisation.
41 lines
1.2 KiB
Text
41 lines
1.2 KiB
Text
# Maintainer: Eivind Uggedal <eu@eju.no>
|
|
pkgname=py3-redis
|
|
_pkgname=redis
|
|
pkgver=4.5.1
|
|
pkgrel=0
|
|
pkgdesc="Python3 client for Redis key-value store"
|
|
url="https://github.com/andymccurdy/redis-py"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="python3 py3-async-timeout py3-hiredis"
|
|
makedepends="py3-setuptools py3-gpep517 py3-wheel"
|
|
checkdepends="py3-pytest py3-mock redis"
|
|
source="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
|
|
|
|
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="
|
|
6a4c620236f5ddb6d4afbe5b09bcc7734331a7e9f9fd6302570f27cbf357e0d5fddd38ce55e8ba298fd4dedc58bccde55ced0d5a0a3067d42246d9f14063e16c redis-4.5.1.tar.gz
|
|
"
|