mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
main/py-redis: build on python2 and python3
This commit is contained in:
parent
b4d83a4728
commit
ea042a80dc
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user