aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-redis
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2017-08-15 01:43:56 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-08-15 01:44:24 +0000
commitea042a80dc99d3399dccbd8782041fda178aeab0 (patch)
tree8c163ca73ed3d7f56c6edab92a27f96fd4c1dff5 /main/py-redis
parentb4d83a4728d6a19d766ab0ab1f53e27aef2d6407 (diff)
downloadaports-ea042a80dc99d3399dccbd8782041fda178aeab0.tar.bz2
aports-ea042a80dc99d3399dccbd8782041fda178aeab0.tar.xz
main/py-redis: build on python2 and python3
Diffstat (limited to 'main/py-redis')
-rw-r--r--main/py-redis/APKBUILD47
1 files changed, 29 insertions, 18 deletions
diff --git a/main/py-redis/APKBUILD b/main/py-redis/APKBUILD
index b3d8c51e67..c150100c53 100644
--- a/main/py-redis/APKBUILD
+++ b/main/py-redis/APKBUILD
@@ -2,37 +2,48 @@
pkgname=py-redis
_pkgname=${pkgname#py-}
pkgver=2.10.3
-pkgrel=0
+pkgrel=1
pkgdesc="Python client for Redis key-value store"
url="https://github.com/andymccurdy/redis-py"
arch="noarch"
license="MIT"
-depends="python2"
+depends=""
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="python2-dev python3-dev py-setuptools"
install=""
-subpackages=""
+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
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
- python2 setup.py build || return 1
+ 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() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+py2() {
+ cd "$builddir"
+ _py python2
+}
+
+py3() {
+ cd "$builddir"
+ _py python3
}
md5sums="7619221ad0cbd124a5687458ea3f5289 redis-2.10.3.tar.gz"