~dricottone/huttese-apk

ref: 6753e70affb0d1c297d93c5472c19e62df4c8216 huttese-apk/sr.ht/py3-redis/APKBUILD -rw-r--r-- 1.0 KiB
6753e70a — Drew DeVault py3-humanize: upgrade to 3.14.0 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Eivind Uggedal <eu@eju.no>
pkgname=py3-redis
_pkgname=redis
pkgver=3.5.3
pkgrel=1
pkgdesc="Python3 client for Redis key-value store"
url="https://github.com/andymccurdy/redis-py"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
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" # Requires running Redis server, unreliable

replaces="py-redis" # Backwards compatibility
provides="py-redis=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	redis-server --dir "$builddir"&
	local _redispid=$!

	python3 setup.py test || (kill $_redispid && false)
	kill $_redispid
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
eae6ac6b3e0f1366a9c29e5e2d9a5210e4627e62e3006159b1c290f36cd9c1c2c12cafe0944f7a010e04632b517874f230aa9411491993b7ecf2080546217206  redis-3.5.3.tar.gz
"