aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-flask-oauthlib
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-10-02 01:36:18 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-10-02 01:36:54 +0200
commit616f5537df6de6cfa1eee9ff79cc214c1be65329 (patch)
treed5ce6634d3821b1fb0c5f78bb7b4d83759eb7322 /main/py-flask-oauthlib
parent49a383b5df6945dcd8ebf3788e33b5b9fdf9d3b4 (diff)
downloadaports-616f5537df6de6cfa1eee9ff79cc214c1be65329.tar.bz2
aports-616f5537df6de6cfa1eee9ff79cc214c1be65329.tar.xz
main/py-flask-oauthlib: add py2/py3 subpackages
Diffstat (limited to 'main/py-flask-oauthlib')
-rw-r--r--main/py-flask-oauthlib/APKBUILD47
1 files changed, 28 insertions, 19 deletions
diff --git a/main/py-flask-oauthlib/APKBUILD b/main/py-flask-oauthlib/APKBUILD
index db2dcb4997..c36ef54f28 100644
--- a/main/py-flask-oauthlib/APKBUILD
+++ b/main/py-flask-oauthlib/APKBUILD
@@ -7,32 +7,41 @@ pkgdesc="Flask OAuth extension using OAuthlib"
url="https://github.com/lepture/flask-oauthlib"
arch="noarch"
license="BSD"
-depends="python3 py-flask py-oauthlib"
-depends_dev=""
-makedepends="python3-dev py-setuptools"
-install=""
-subpackages=""
+depends="py-flask py-requests-oauthlib"
+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
-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"
- python3 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ replaces="$pkgname"
+ 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="5cf967e3f678a22aee8cb99ebc906c58 Flask-OAuthlib-0.9.3.tar.gz"