diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-08-15 02:00:52 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-08-15 02:00:52 +0000 |
commit | 0c9f0037d56a6a5357d2e7bbfab85e2346a9123d (patch) | |
tree | fa593fc44a4d20fd46a02c8861c1b539c441d87d /testing/py-flask-sqlalchemy/APKBUILD | |
parent | 3b6af96067b224097922d08fc9d15816d8117c1c (diff) | |
download | aports-0c9f0037d56a6a5357d2e7bbfab85e2346a9123d.tar.bz2 aports-0c9f0037d56a6a5357d2e7bbfab85e2346a9123d.tar.xz |
testing/py-flask-sqlalchemy: enable python3 support
Diffstat (limited to 'testing/py-flask-sqlalchemy/APKBUILD')
-rw-r--r-- | testing/py-flask-sqlalchemy/APKBUILD | 45 |
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" |