2016-03-17 05:36:13 +08:00
|
|
|
# $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>
|
|
|
|
|
2017-10-27 06:01:37 +08:00
|
|
|
pkgbase=python-flask
|
2016-03-17 05:36:13 +08:00
|
|
|
pkgname=('python3-flask' 'python2-flask')
|
2017-10-27 06:01:37 +08:00
|
|
|
pkgver=0.12.2
|
2017-11-07 04:09:13 +08:00
|
|
|
pkgrel=2
|
2016-03-17 05:36:13 +08:00
|
|
|
pkgdesc='Micro webdevelopment framework for Python'
|
|
|
|
url='http://flask.pocoo.org/'
|
|
|
|
arch=('any')
|
|
|
|
license=('custom:BSD')
|
|
|
|
makedepends=('python3-setuptools' 'python2-setuptools')
|
2017-10-27 06:01:37 +08:00
|
|
|
source=("https://github.com/pallets/flask/archive/${pkgver}.tar.gz")
|
|
|
|
sha256sums=('7b1306b690c706b0f4054c23bda57565fc050b5736bfd034609c1f26d35bfa28')
|
2016-03-17 05:36:13 +08:00
|
|
|
|
|
|
|
prepare() {
|
2017-10-27 06:01:37 +08:00
|
|
|
cp -r "flask-$pkgver" "python3-flask-$pkgver"
|
|
|
|
cp -r "flask-$pkgver" "python2-flask-$pkgver"
|
2016-03-17 05:36:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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')
|
2016-03-17 05:36:13 +08:00
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
|
|
|
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
2017-10-27 06:01:37 +08:00
|
|
|
mv "$pkgdir"/usr/bin/flask "$pkgdir"/usr/bin/flask3
|
2016-03-17 05:36:13 +08:00
|
|
|
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')
|
2016-03-17 05:36:13 +08:00
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
|
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
2017-10-27 06:01:37 +08:00
|
|
|
mv "$pkgdir"/usr/bin/flask "$pkgdir"/usr/bin/flask2
|
2016-03-17 05:36:13 +08:00
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
}
|
|
|
|
|