aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-oauthlib/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-10-02 01:26:06 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-10-02 01:36:54 +0200
commita6a38338615487914a842b60a2d36b24a03777db (patch)
treef33a1f2c7c7d52f02469f220c6eae20843af55e1 /main/py-oauthlib/APKBUILD
parente6804f9d0c14439ff2f208f68d7ba819b8c1a260 (diff)
downloadaports-a6a38338615487914a842b60a2d36b24a03777db.tar.bz2
aports-a6a38338615487914a842b60a2d36b24a03777db.tar.xz
main/py-oauthlib: add py2/py3 subpackages
Diffstat (limited to 'main/py-oauthlib/APKBUILD')
-rw-r--r--main/py-oauthlib/APKBUILD59
1 files changed, 34 insertions, 25 deletions
diff --git a/main/py-oauthlib/APKBUILD b/main/py-oauthlib/APKBUILD
index 259e1860dd..6059a6ce36 100644
--- a/main/py-oauthlib/APKBUILD
+++ b/main/py-oauthlib/APKBUILD
@@ -1,40 +1,49 @@
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=py-oauthlib
_pkgname=${pkgname#py-}
-pkgver=1.1.1
+pkgver=2.0.0
pkgrel=0
pkgdesc="A Python implementation of the OAuth request-signing logic"
url="https://github.com/idan/oauthlib"
arch="noarch"
license="BSD"
-depends="python py-crypto py-jwt"
-depends_dev=""
-makedepends="python-dev py-setuptools"
-install=""
-subpackages=""
-source="oauthlib-$pkgver.tar.gz::https://github.com/idan/oauthlib/archive/$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
-}
+depends="py-crypto py-jwt"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$_builddir"
- python setup.py build || return 1
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python 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="b8ab57d6b88a98b09baf7acf26112646 oauthlib-1.1.1.tar.gz"
-sha256sums="8f33925202caeb681eaf0eead5552487f8c9026c241dbed3084a5462c52ac693 oauthlib-1.1.1.tar.gz"
-sha512sums="5a5db7e054b38d88a8b04c58ec028f8a007f3147d041f9683a1080309cc89c278787df70ec6089d9a0096cc14d5b61eddbfc248e0399c07f8aeccb39717b4c27 oauthlib-1.1.1.tar.gz"
+md5sums="ecac945955ddae906637c23b05f3a7b0 oauthlib-2.0.0.tar.gz"
+sha256sums="4e32ecb2135f3616b61ab8d9d09a8af7628eb4d6485616b4eb04e28c54216609 oauthlib-2.0.0.tar.gz"
+sha512sums="b167233d7cd5c5b7fed09adb5d811f7d824926fdf302f95ee862b7643ff84abb5bd83f97a43f13ddcddfeeefc05af4e5c7cd726e87a299a943c39d2f4e98b683 oauthlib-2.0.0.tar.gz"