aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2017-02-25 16:09:43 +0800
committerWilliam Pitcock <nenolod@dereferenced.org>2017-02-26 21:37:38 +0000
commitf32512f3f242eb28d0d0920e3f7742295a0d4041 (patch)
treea8f2ff8cafbb0889fc9b841c173c530733524797
parent9c8ca8fa6919386379f4aad5dfa7f250ab3116fb (diff)
downloadaports-f32512f3f242eb28d0d0920e3f7742295a0d4041.tar.bz2
aports-f32512f3f242eb28d0d0920e3f7742295a0d4041.tar.xz
main/py-oauth2client: bump version to 4.0.0 and add py3 subpackages
-rw-r--r--main/py-oauth2client/APKBUILD53
1 files changed, 30 insertions, 23 deletions
diff --git a/main/py-oauth2client/APKBUILD b/main/py-oauth2client/APKBUILD
index 60c48b8323..b17cf03ddd 100644
--- a/main/py-oauth2client/APKBUILD
+++ b/main/py-oauth2client/APKBUILD
@@ -1,40 +1,47 @@
# Maintainer: Peter Bui <pnutzh4x0r@gmail.com>
pkgname=py-oauth2client
_pkgname=oauth2client
-pkgver=1.4.12
+pkgver=4.0.0
pkgrel=0
pkgdesc="A client library for OAuth 2.0"
url="https://github.com/google/oauth2client"
arch="noarch"
license="Apache"
-depends="python2 py-asn1 py-httplib2 py-asn1-modules py-rsa py-six"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
+depends="py-asn1 py-httplib2 py-asn1-modules py-rsa py-six"
+makedepends="python2-dev python3-dev py-setuptools"
+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() {
- 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"
+ cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="829a05a559b43215d67947aaff9c11b5 oauth2client-1.4.12.tar.gz"
-sha256sums="74aa6c3beb90a4a7b9b8d0bc3cd60db34d45c5ee6136187bb9eabe85b4990e5e oauth2client-1.4.12.tar.gz"
-sha512sums="90be14e7572f4f25b9284969f2b3969a8be8115b0b648c45e022353ca101c716a8f1478045f807909774cc9abbb82c60547d01458707904b8d7aa7cc64467a2c oauth2client-1.4.12.tar.gz"
+sha512sums="3883a148a3db7069bc1c16a1110789b0b1a8b13c56a11b50eec11907ef360b5e204dbb302a7e6f8f3f3addf009d4eac773ab50a1dc04cfaa914a4b3a54811553 oauth2client-4.0.0.tar.gz"