Mail archive
alpine-aports

[alpine-aports] [PATCH v3 08/10] main/py-requests: adopt

From: Drew DeVault <sir_at_cmpwn.com>
Date: Wed, 3 Apr 2019 16:16:40 -0400

---
 main/py-requests/APKBUILD | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/main/py-requests/APKBUILD b/main/py-requests/APKBUILD
index 7256d9b53f..1915a62c31 100644
--- a/main/py-requests/APKBUILD
+++ b/main/py-requests/APKBUILD
_at_@ -1,17 +1,20 @@
 # Contributor: Peter Bui <pnutzh4x0r_at_gmail.com>
-# Maintainer: 
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
 pkgname=py-requests
 _pkgname=requests
 pkgver=2.21.0
-pkgrel=0
+pkgrel=1
 pkgdesc="A HTTP request library for Python"
 url="http://www.python-requests.org/"
 arch="noarch"
 license="Apache-2.0"
 # Requirements for tests are not available in main
 options="!check"
-depends="py-chardet py-idna py-certifi py-urllib3"
-makedepends="python2-dev py-setuptools python3-dev"
+_py2_deps="py2-chardet py2-idna py2-certifi py2-urllib3"
+_py3_deps="py3-chardet py3-idna py3-certifi py3-urllib3"
+makedepends="
+	$_py2_deps $_py3_deps python2-dev python3-dev py2-setuptools py3-setuptools
+"
 subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
 source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
 builddir="$srcdir/$_pkgname-$pkgver"
_at_@ -26,6 +29,17 @@ package() {
 	mkdir -p "$pkgdir"
 }
 
+_py2() {
+	replaces="$pkgname"
+	depends="$_py2_deps"
+	_py python2
+}
+
+_py3() {
+	depends="$_py3_deps"
+	_py python3
+}
+
 _py() {
 	local python="$1"
 	pkgdesc="$pkgdesc ${python#python}"
_at_@ -36,15 +50,4 @@ _py() {
 	$python setup.py install --prefix=/usr --root="$subpkgdir"
 }
 
-_py2() {
-	replaces="$pkgname"
-	depends="${depends//py-/py2-}"
-	_py python2
-}
-
-_py3() {
-	depends="${depends//py-/py3-}"
-	_py python3
-}
-
 sha512sums="385e1d80993a21c09e7c4682500ca8c24155962ba41ecd8e73612722b2ff6618b736e827fc48ad1683b0d2bc7a420cfe680f5107860aca52656ef777f1d60104  requests-2.21.0.tar.gz"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Apr 03 2019 - 16:16:40 UTC