archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-flask-jwt / trunk / PKGBUILD
blobac581670552a7d57ea79b6d97bea23412892af0e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-flask-jwt
4 pkgver=0.3.2
5 pkgrel=10
6 pkgdesc="JWT token authentication for Flask apps"
7 url="https://github.com/mattupstate/flask-jwt"
8 license=('MIT')
9 arch=('any')
10 depends=('python-flask' 'python-pyjwt')
11 makedepends=('python-setuptools')
12 checkdepends=('python-pytest-runner')
13 source=("$pkgname-$pkgver.tar.gz::https://github.com/mattupstate/flask-jwt/archive/$pkgver.tar.gz"
14         pyjwt-2.0.0.patch)
15 sha512sums=('7c115ff4964da9a36303ac502dea98cd847abc3c1d45cd0be09b82ec761ee054d7ef97e25fd669112ab29dbfca00b4563914155ab1c8da4fc3d32f0063128b26'
16             '4ec0a901263ac39bdb204bb684413617a5e1250536b07d03eb89fe489c58492b1960be0d3c429f908ea71e782563c0c3c6fcd76ec40fa7ae829c9a772355ed7f')
18 prepare() {
19   cd flask-jwt-$pkgver
20   # https://github.com/mattupstate/flask-jwt/issues/143
21   patch -Np1 -i ../pyjwt-2.0.0.patch
22   # Too old options
23   sed -i 's/,<1.5.0//' requirements.txt
24   echo > requirements-dev.txt
25   rm setup.cfg
28 build() {
29   cd flask-jwt-$pkgver
30   python setup.py build
33 check() {
34   cd flask-jwt-$pkgver
35   python setup.py pytest
38 package() {
39   cd flask-jwt-$pkgver
40   python setup.py install --root="$pkgdir" --optimize=1
41   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE