Mail archive
alpine-aports

[alpine-aports] [PATCH 3/4] main/py-oauth2client: bump version to 4.0.0 and add py3 subpackages

From: Ivan Tham <pickfire_at_riseup.net>
Date: Sat, 25 Feb 2017 16:09:43 +0800

---
 main/py-oauth2client/APKBUILD | 53 ++++++++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 23 deletions(-)
diff --git a/main/py-oauth2client/APKBUILD b/main/py-oauth2client/APKBUILD
index 60c48b8..b17cf03 100644
--- a/main/py-oauth2client/APKBUILD
+++ b/main/py-oauth2client/APKBUILD
_at_@ -1,40 +1,47 @@
 # Maintainer: Peter Bui <pnutzh4x0r_at_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"
-- 
2.11.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sat Feb 25 2017 - 16:09:43 GMT