[arch-commits] Commit in python-jose/repos/community-staging-any (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Nov 2 22:19:49 UTC 2019
Date: Saturday, November 2, 2019 @ 22:19:48
Author: foutrelis
Revision: 522289
archrelease: copy trunk to community-staging-any
Added:
python-jose/repos/community-staging-any/PKGBUILD
(from rev 522288, python-jose/trunk/PKGBUILD)
python-jose/repos/community-staging-any/pytest5.patch
(from rev 522288, python-jose/trunk/pytest5.patch)
Deleted:
python-jose/repos/community-staging-any/PKGBUILD
---------------+
PKGBUILD | 119 ++++++++++++++++++++++++++++----------------------------
pytest5.patch | 27 ++++++++++++
2 files changed, 88 insertions(+), 58 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-11-02 22:19:43 UTC (rev 522288)
+++ PKGBUILD 2019-11-02 22:19:48 UTC (rev 522289)
@@ -1,58 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-jose
-pkgname=('python-jose' 'python2-jose')
-pkgver=3.0.1
-pkgrel=2
-pkgdesc="A JOSE implementation in Python"
-arch=('any')
-license=('MIT')
-url="https://github.com/mpdavis/python-jose"
-makedepends=('python-setuptools' 'python2-setuptools' 'python-rsa' 'python2-rsa'
- 'python-six' 'python2-six' 'python-ecdsa' 'python2-ecdsa' 'python-future'
- 'python2-future')
-checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-cryptography'
- 'python2-cryptography' 'python-pycryptodome' 'python2-pycryptodome'
- 'python-pytest-cov' 'python2-pytest-cov')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/mpdavis/python-jose/archive/$pkgver.tar.gz")
-sha512sums=('a39c3aa9acc6bcc0030e4435e499581043a820c54aa1a4b67ae478cf95f96f28755b03fa4453e484932a64865a61613a1ff4afe30249216e8f392638485693d7')
-
-prepare() {
- cp -a python-jose-$pkgver{,-py2}
-}
-
-build() {
- cd "$srcdir"/python-jose-$pkgver
- python setup.py build
-
- cd "$srcdir"/python-jose-$pkgver-py2
- python2 setup.py build
-}
-
-check() {
- cd "$srcdir"/python-jose-$pkgver
- python setup.py pytest
-
- cd "$srcdir"/python-jose-$pkgver-py2
- python2 setup.py pytest
-}
-
-package_python-jose() {
- depends=('python-rsa' 'python-six' 'python-ecdsa' 'python-future')
- optdepends=('python-cryptography: one option for better performance'
- 'python-pycryptodome: one option for better performance')
-
- cd python-jose-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-package_python2-jose() {
- depends=('python2-rsa' 'python2-six' 'python2-ecdsa' 'python2-future')
- optdepends=('python2-cryptography: one option for better performance'
- 'python2-pycryptodome: one option for better performance')
-
- cd python-jose-$pkgver-py2
- python2 setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
Copied: python-jose/repos/community-staging-any/PKGBUILD (from rev 522288, python-jose/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-11-02 22:19:48 UTC (rev 522289)
@@ -0,0 +1,61 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-jose
+pkgname=('python-jose' 'python2-jose')
+pkgver=3.0.1
+pkgrel=3
+pkgdesc="A JOSE implementation in Python"
+arch=('any')
+license=('MIT')
+url="https://github.com/mpdavis/python-jose"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-rsa' 'python2-rsa'
+ 'python-six' 'python2-six' 'python-ecdsa' 'python2-ecdsa' 'python-future'
+ 'python2-future')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-cryptography'
+ 'python2-cryptography' 'python-pycryptodome' 'python2-pycryptodome'
+ 'python-pytest-cov' 'python2-pytest-cov')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/mpdavis/python-jose/archive/$pkgver.tar.gz"
+ 'pytest5.patch')
+sha512sums=('a39c3aa9acc6bcc0030e4435e499581043a820c54aa1a4b67ae478cf95f96f28755b03fa4453e484932a64865a61613a1ff4afe30249216e8f392638485693d7'
+ '0406340a45309e0b9411e451a68ca353454bb10bc34309264abc9b56fe4fed1c2eda705d5a7625a35333043030b0032ad70cf7da1feea673595c2fdf8423a234')
+
+prepare() {
+ patch -Np1 -d python-jose-$pkgver <pytest5.patch
+ cp -a python-jose-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/python-jose-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/python-jose-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/python-jose-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/python-jose-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-jose() {
+ depends=('python-rsa' 'python-six' 'python-ecdsa' 'python-future')
+ optdepends=('python-cryptography: one option for better performance'
+ 'python-pycryptodome: one option for better performance')
+
+ cd python-jose-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-jose() {
+ depends=('python2-rsa' 'python2-six' 'python2-ecdsa' 'python2-future')
+ optdepends=('python2-cryptography: one option for better performance'
+ 'python2-pycryptodome: one option for better performance')
+
+ cd python-jose-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Copied: python-jose/repos/community-staging-any/pytest5.patch (from rev 522288, python-jose/trunk/pytest5.patch)
===================================================================
--- pytest5.patch (rev 0)
+++ pytest5.patch 2019-11-02 22:19:48 UTC (rev 522289)
@@ -0,0 +1,27 @@
+From a120278ad6a28abcc632673b47ef3af3c2c64d70 Mon Sep 17 00:00:00 2001
+From: Gasper Zejn <zelo.zejn at gmail.com>
+Date: Fri, 12 Apr 2019 10:30:37 +0200
+Subject: [PATCH] Fix incorrect use of pytest.raises(message=...)
+
+diff --git a/tests/test_jwt.py b/tests/test_jwt.py
+index 9ceb239..75ed3fc 100644
+--- a/tests/test_jwt.py
++++ b/tests/test_jwt.py
+@@ -62,7 +62,7 @@ def return_invalid_json(token, key, algorithms, verify=True):
+
+ jws.verify = return_invalid_json
+
+- with pytest.raises(JWTError, message='Invalid payload string: ["a", "b"}'):
++ with pytest.raises(JWTError, match='Invalid payload string: '):
+ jwt.decode(token, 'secret', ['HS256'])
+ finally:
+ jws.verify = old_jws_verify
+@@ -77,7 +77,7 @@ def return_encoded_array(token, key, algorithms, verify=True):
+
+ jws.verify = return_encoded_array
+
+- with pytest.raises(JWTError, message='Invalid payload string: must be a json object'):
++ with pytest.raises(JWTError, match='Invalid payload string: must be a json object'):
+ jwt.decode(token, 'secret', ['HS256'])
+ finally:
+ jws.verify = old_jws_verify
More information about the arch-commits
mailing list