desktop/python-flask/PKGBUILD

62 lines
1.6 KiB
Bash
Raw Permalink Normal View History

# $Id$
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Tarmo Heiskanen <turskii@gmail.com>
pkgbase=python-flask
pkgname=('python3-flask' 'python2-flask')
pkgver=0.12.2
2017-11-07 04:09:13 +08:00
pkgrel=2
pkgdesc='Micro webdevelopment framework for Python'
url='http://flask.pocoo.org/'
arch=('any')
license=('custom:BSD')
makedepends=('python3-setuptools' 'python2-setuptools')
source=("https://github.com/pallets/flask/archive/${pkgver}.tar.gz")
sha256sums=('7b1306b690c706b0f4054c23bda57565fc050b5736bfd034609c1f26d35bfa28')
prepare() {
cp -r "flask-$pkgver" "python3-flask-$pkgver"
cp -r "flask-$pkgver" "python2-flask-$pkgver"
}
build_python3-flask() {
cd "$pkgname-$pkgver"
python3 setup.py build
}
build_python2-flask() {
cd "$pkgname-$pkgver"
python setup.py build
}
check_python3-flask() {
cd "$pkgname-$pkgver"
python3 setup.py test
cd "$pkgname-$pkgver"
python2 setup.py test
}
package_python3-flask() {
2017-11-07 04:09:13 +08:00
depends=('python3-werkzeug' 'python3-jinja' 'python3-itsdangerous' 'python3-click')
cd "$pkgname-$pkgver"
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
mv "$pkgdir"/usr/bin/flask "$pkgdir"/usr/bin/flask3
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python2-flask() {
2017-11-07 04:09:13 +08:00
depends=('python2-werkzeug' 'python2-jinja' 'python2-itsdangerous' 'python2-click')
cd "$pkgname-$pkgver"
python2 setup.py install --root="$pkgdir" --optimize=1
mv "$pkgdir"/usr/bin/flask "$pkgdir"/usr/bin/flask2
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}