aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/py-httplib2/APKBUILD20
1 files changed, 15 insertions, 5 deletions
diff --git a/main/py-httplib2/APKBUILD b/main/py-httplib2/APKBUILD
index 2ff97d54d7..c2c965255c 100644
--- a/main/py-httplib2/APKBUILD
+++ b/main/py-httplib2/APKBUILD
@@ -3,7 +3,7 @@
pkgname=py-httplib2
_pkgname=httplib2
pkgver=0.10.3
-pkgrel=0
+pkgrel=1
pkgdesc="A Python HTTP client library"
url="https://github.com/httplib2/httplib2"
arch="noarch"
@@ -13,10 +13,18 @@ subpackages="py2-${_pkgname}:_py2 py3-${_pkgname}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
+prepare() {
+ default_prepare
+ local python; for python in python2 python3; do
+ cp -r "$builddir" "$builddir-$python"
+ done
+}
+
build() {
- cd "$builddir"
- python2 setup.py build || return 1
- python3 setup.py build || return 1
+ local python; for python in python2 python3; do
+ cd "$builddir"-$python
+ $python setup.py build
+ done
}
package() {
@@ -25,10 +33,12 @@ package() {
_py2() {
replaces="$pkgname"
+ depends="${depends//py-/py2-}"
_py python2
}
_py3() {
+ depends="${depends//py-/py3-}"
_py python3
}
@@ -38,7 +48,7 @@ _py() {
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
- cd "$builddir"
+ cd "$builddir"-$python
$python setup.py install --prefix=/usr --root="$subpkgdir"
}