aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-redis/APKBUILD
blob: c797496d6f3ec62ce17f045560971109206c470f (plain) (blame)
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
# Maintainer: Eivind Uggedal <eu@eju.no>
pkgname=py3-redis
_pkgname=redis
pkgver=3.2.1
pkgrel=2
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

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="be51642a8895325c3c61993dd83c3299a9e2cefc1010e04f182833f720ff161bea43d3a57d28afba991949fcf6e967c4f778002967641bffe651d5db384f2e08  redis-3.2.1.tar.gz"