aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-flask-sqlalchemy
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py-flask-sqlalchemy')
-rw-r--r--testing/py-flask-sqlalchemy/APKBUILD45
1 files changed, 28 insertions, 17 deletions
diff --git a/testing/py-flask-sqlalchemy/APKBUILD b/testing/py-flask-sqlalchemy/APKBUILD
index 92e5ff12cb..30184e39d4 100644
--- a/testing/py-flask-sqlalchemy/APKBUILD
+++ b/testing/py-flask-sqlalchemy/APKBUILD
@@ -2,37 +2,48 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=py-flask-sqlalchemy
pkgver=2.1
-pkgrel=0
+pkgrel=1
pkgdesc="SQLAlchemy integration for Flask"
url="http://flask.pocoo.org/"
arch="noarch"
license="MIT"
-depends="python2 py-flask py-sqlalchemy"
+depends="py-flask py-sqlalchemy"
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="python2-dev python3-dev py-setuptools"
install=""
-subpackages=""
+subpackages="py2-flask-sqlalchemy:py2 py3-flask-sqlalchemy:py3"
source="https://files.pythonhosted.org/packages/source/F/Flask-SQLAlchemy/Flask-SQLAlchemy-$pkgver.tar.gz"
-_builddir="$srcdir"/Flask-SQLAlchemy-$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"/Flask-SQLAlchemy-$pkgver
build() {
cd "$_builddir"
- python2 setup.py build || return 1
+ python2 setup.py build
+ python3 setup.py build
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc ${python#python}"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+py2() {
+ cd "$builddir"
+ _py python2
+}
+
+py3() {
+ cd "$builddir"
+ _py python3
}
md5sums="dc15fe08b07b434d3d2c4063b4674b72 Flask-SQLAlchemy-2.1.tar.gz"