[arch-commits] Commit in python-flask-jwt/repos/community-staging-any (3 files)

Felix Yan felixonmars at gemini.archlinux.org
Mon Dec 6 21:45:29 UTC 2021


    Date: Monday, December 6, 2021 @ 21:45:29
  Author: felixonmars
Revision: 1065398

archrelease: copy trunk to community-staging-any

Added:
  python-flask-jwt/repos/community-staging-any/PKGBUILD
    (from rev 1065397, python-flask-jwt/trunk/PKGBUILD)
  python-flask-jwt/repos/community-staging-any/pyjwt-2.0.0.patch
    (from rev 1065397, python-flask-jwt/trunk/pyjwt-2.0.0.patch)
Deleted:
  python-flask-jwt/repos/community-staging-any/PKGBUILD

-------------------+
 PKGBUILD          |   79 +++++++++++++++++++++++++++-------------------------
 pyjwt-2.0.0.patch |   24 +++++++++++++++
 2 files changed, 66 insertions(+), 37 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-06 21:45:19 UTC (rev 1065397)
+++ PKGBUILD	2021-12-06 21:45:29 UTC (rev 1065398)
@@ -1,37 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgname=python-flask-jwt
-pkgver=0.3.2
-pkgrel=8
-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")
-sha512sums=('7c115ff4964da9a36303ac502dea98cd847abc3c1d45cd0be09b82ec761ee054d7ef97e25fd669112ab29dbfca00b4563914155ab1c8da4fc3d32f0063128b26')
-
-prepare() {
-  # Too old options
-  sed -i 's/,<1.5.0//' flask-jwt-$pkgver/requirements.txt
-  echo > flask-jwt-$pkgver/requirements-dev.txt
-  rm flask-jwt-$pkgver/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/PKGBUILD (from rev 1065397, python-flask-jwt/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-06 21:45:29 UTC (rev 1065398)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-flask-jwt
+pkgver=0.3.2
+pkgrel=9
+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 1065397, python-flask-jwt/trunk/pyjwt-2.0.0.patch)
===================================================================
--- pyjwt-2.0.0.patch	                        (rev 0)
+++ pyjwt-2.0.0.patch	2021-12-06 21:45:29 UTC (rev 1065398)
@@ -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})



More information about the arch-commits mailing list