diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-19 00:27:35 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-19 00:34:38 +0200 |
commit | 79b1c1cf1b324769eaa4c38ecc9f2973e63527fe (patch) | |
tree | 40b6afcd97e4a3ecfc6b73802ce83876572e05c1 /main/py-flask | |
parent | 90117ef57b3210b4368bfa713b23452140fbf5b6 (diff) | |
download | aports-79b1c1cf1b324769eaa4c38ecc9f2973e63527fe.tar.bz2 aports-79b1c1cf1b324769eaa4c38ecc9f2973e63527fe.tar.xz |
main/py-flask: add py2/py3 subpackages
Diffstat (limited to 'main/py-flask')
-rw-r--r-- | main/py-flask/APKBUILD | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/main/py-flask/APKBUILD b/main/py-flask/APKBUILD index 98ea01b9d3..5f8dd9ed0e 100644 --- a/main/py-flask/APKBUILD +++ b/main/py-flask/APKBUILD @@ -3,37 +3,47 @@ pkgname=py-flask _pkgname=Flask pkgver=0.10.1 -pkgrel=1 +pkgrel=2 pkgdesc="A web development microframework" url="http://flask.pocoo.org/" arch="noarch" license="MIT" -depends="python py-werkzeug py-jinja2 py-itsdangerous" -depends_dev="" -makedepends="python-dev py-setuptools" -install="" -subpackages="" +depends="" +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"/Flask-$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" - python setup.py build || return 1 + cd "$builddir" + + python2 setup.py build || return 1 + python3 setup.py build } package() { - cd "$_builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + depends="py2-itsdangerous py2-jinja2 py2-werkzeug" + _py python2 +} + +_py3() { + depends="py3-itsdangerous py3-jinja2 py3-werkzeug" + _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="378670fe456957eb3c27ddaef60b2b24 Flask-0.10.1.tar.gz" |