Date: Sunday, April 9, 2023 @ 04:09:00
Author: felixonmars
Revision: 1443091
archrelease: copy trunk to community-staging-any
Added:
python-flask-jwt/repos/community-staging-any/
python-flask-jwt/repos/community-staging-any/PKGBUILD
(from rev 1443089, python-flask-jwt/trunk/PKGBUILD)
python-flask-jwt/repos/community-staging-any/pyjwt-2.0.0.patch
(from rev 1443089, python-flask-jwt/trunk/pyjwt-2.0.0.patch)
-------------------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
pyjwt-2.0.0.patch | 24 ++++++++++++++++++++++++
2 files changed, 66 insertions(+)
Copied: python-flask-jwt/repos/community-staging-any/PKGBUILD (from rev
1443089, python-flask-jwt/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-09 04:09:00 UTC (rev 1443091)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-flask-jwt
+pkgver=0.3.2
+pkgrel=10
+pkgdesc="JWT token authentication for Flask apps"
+url="https://github.com/mattupstate/flask-jwt"
+license=('MIT')
+arch=('any')
+depends=('python-flask' 'python-pyjwt')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/mattupstate/flask-jwt/archive/$pkgver.tar.gz"
+ pyjwt-2.0.0.patch)
+sha512sums=('7c115ff4964da9a36303ac502dea98cd847abc3c1d45cd0be09b82ec761ee054d7ef97e25fd669112ab29dbfca00b4563914155ab1c8da4fc3d32f0063128b26'
+
'4ec0a901263ac39bdb204bb684413617a5e1250536b07d03eb89fe489c58492b1960be0d3c429f908ea71e782563c0c3c6fcd76ec40fa7ae829c9a772355ed7f')
+
+prepare() {
+ cd flask-jwt-$pkgver
+ # https://github.com/mattupstate/flask-jwt/issues/143
+ patch -Np1 -i ../pyjwt-2.0.0.patch
+ # Too old options
+ sed -i 's/,<1.5.0//' requirements.txt
+ echo > requirements-dev.txt
+ rm setup.cfg
+}
+
+build() {
+ cd flask-jwt-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd flask-jwt-$pkgver
+ python setup.py pytest
+}
+
+package() {
+ cd flask-jwt-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Copied: python-flask-jwt/repos/community-staging-any/pyjwt-2.0.0.patch (from
rev 1443089, python-flask-jwt/trunk/pyjwt-2.0.0.patch)
===================================================================
--- community-staging-any/pyjwt-2.0.0.patch (rev 0)
+++ community-staging-any/pyjwt-2.0.0.patch 2023-04-09 04:09:00 UTC (rev
1443091)
@@ -0,0 +1,24 @@
+diff -upr flask-jwt-0.3.2.orig/flask_jwt/__init__.py
flask-jwt-0.3.2/flask_jwt/__init__.py
+--- flask-jwt-0.3.2.orig/flask_jwt/__init__.py 2015-11-03 16:41:38.000000000
+0200
++++ flask-jwt-0.3.2/flask_jwt/__init__.py 2021-12-06 23:38:24.755653892
+0200
+@@ -129,7 +129,7 @@ def _default_auth_request_handler():
+
+
+ def _default_auth_response_handler(access_token, identity):
+- return jsonify({'access_token': access_token.decode('utf-8')})
++ return jsonify({'access_token': access_token})
+
+
+ def _default_jwt_error_handler(error):
+diff -upr flask-jwt-0.3.2.orig/tests/test_jwt.py
flask-jwt-0.3.2/tests/test_jwt.py
+--- flask-jwt-0.3.2.orig/tests/test_jwt.py 2015-11-03 16:41:38.000000000
+0200
++++ flask-jwt-0.3.2/tests/test_jwt.py 2021-12-06 23:38:31.295817131 +0200
+@@ -193,7 +193,7 @@ def test_custom_error_handler(client, jw
+ def test_custom_response_handler(client, jwt, user):
+ @jwt.auth_response_handler
+ def resp_handler(access_token, identity):
+- return jsonify({'mytoken': access_token.decode('utf-8')})
++ return jsonify({'mytoken': access_token})
+
+ resp, jdata = post_json(
+ client, '/auth', {'username': user.username, 'password':
user.password})