Subject: [alpine-aports] [PATCH] testing/py-botocore: upgrade to 1.4.85

From: Valery Kartel <[email-masked]>
Date: Wed, 14 Dec 2016 19:02:54 +0200

---
 testing/py-botocore/APKBUILD | 48 ++++++++++++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 17 deletions(-)

diff --git a/testing/py-botocore/APKBUILD b/testing/py-botocore/APKBUILD
index 8bbdca71d3..5152a32e71 100644
--- a/testing/py-botocore/APKBUILD
+++ b/testing/py-botocore/APKBUILD
@@ -1,32 +1,46 @@
 # Maintainer: Valery Kartel <[email-masked]>
 # Contributor: Valery Kartel <[email-masked]>
 pkgname=py-botocore
-_pkgname=botocore
-pkgver=1.4.3
+pkgver=1.4.85
 pkgrel=0
+_python="2 3"
+_pyname=${pkgname#py-}
 pkgdesc="The low-level, core functionality of Boto3"
 url="https://github.com/boto/boto"
 arch="noarch"
 license="apache2"
-depends="python2 py-dateutil py-jmespath"
-depends_dev=
-makedepends="python2-dev py-setuptools"
-install=
-subpackages=
-source="$_pkgname-$pkgver.tar.gz::https://github.com/boto/$_pkgname/archive/$pkgver.tar.gz"
-
-builddir="$srcdir"/$_pkgname-$pkgver
+depends="py-dateutil py-jmespath"
+depends_dev=""
+makedepends="py-setuptools"
+install=""
+subpackages=""
+source="$_pyname-$pkgver.tar.gz::https://github.com/boto/$_pyname/archive/$pkgver.tar.gz"
+for v in $_python; do
+	makedepends="$makedepends python$v-dev"
+	subpackages="$subpackages py$v-$_pyname:package"
+done
+builddir="$srcdir"/$_pyname-$pkgver
 
 build() {
 	cd "$builddir"
-	python2 setup.py build || return 1
+	for v in $_python; do
+		python$v setup.py build || return 1
+	done
 }
 
 package() {
-	cd "$builddir"
-	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+	local v=${subpkgname:2:1}
+	if [ "$v" ]; then
+		cd "$builddir"
+		pkgdesc="$pkgdesc (for python$v)"
+		depends="${depends//py-/py$v-} python$v"
+		[ "$v" == "2" ] && replaces=$pkgname
+		install_if="$pkgname=$pkgver-r$pkgrel python$v"
+		python$v setup.py install --prefix=/usr --root="$subpkgdir" || return 1
+	else
+		mkdir -p "$pkgdir"
+	fi
 }
-
-md5sums="77ae3f0ed9130b08b192338e1a14f813  botocore-1.4.3.tar.gz"
-sha256sums="311c40b84e5bbf70ae13dad81ce1f36466a76c8f8ce472d84fc72f5d41aaf019  botocore-1.4.3.tar.gz"
-sha512sums="c49fab82d90a74659d8498be0c4c47051c09d6ee3a39ef6590bcd0835d8a9f9bfb32b397bdd09e285afc1bf014e362da551f5161a9aee924949eeba3b9628300  botocore-1.4.3.tar.gz"
+md5sums="b137db3b4c6b0b961d2bf6b40a4a9b3d  botocore-1.4.85.tar.gz"
+sha256sums="2687f27fa0a9540ada4a1b82c5a6657ed5e03fb0eebc6b20adbe9db256a70a49  botocore-1.4.85.tar.gz"
+sha512sums="0b5f6edaa5b6d67bccb18523b14d80ead79a1274f49667c30d7d7dc7361d7c4124c3c1336b37fb6bebf0eb0b17ebb6d067ec0621f9da2a7705979f427068849c  botocore-1.4.85.tar.gz"
-- 
2.11.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---