aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-redis/APKBUILD
blob: 28e99c683beabd59e099da2898e92a3eae53d865 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
# Maintainer:
pkgname=py-redis
_pkgname=${pkgname#py-}
pkgver=2.10.6
pkgrel=0
pkgdesc="Python client for Redis key-value store"
url="https://github.com/andymccurdy/redis-py"
arch="noarch"
license="MIT"
depends=""
depends_dev=""
makedepends="python2-dev python3-dev py-setuptools"
install=""
subpackages="py2-redis:py2 py3-redis:py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

_py() {
        local python="$1"
        pkgdesc="$pkgdesc ${python#python}"
        depends="$depends $python"
        install_if="$pkgname=$pkgver-r$pkgrel $python"

        cd "$builddir"
        $python setup.py install --prefix=/usr --root="$subpkgdir"
}

package() {
	mkdir -p "$pkgdir"
}

py2() {
	cd "$builddir"
	_py python2
}

py3() {
	cd "$builddir"
	_py python3
}

sha512sums="e7df464bc3b26e23f6a0d2d2896306c1e4792b9a2a4ecaea6dd8690ffa17853cc85345f063307295dd3c2da399f7f203f4b21d785f7e073c0501732257419dad  redis-2.10.6.tar.gz"