[arch-commits] Commit in gunicorn/repos/community-staging-any (3 files)
Felix Yan
felixonmars at archlinux.org
Fri Nov 1 13:18:36 UTC 2019
Date: Friday, November 1, 2019 @ 13:18:36
Author: felixonmars
Revision: 521784
archrelease: copy trunk to community-staging-any
Added:
gunicorn/repos/community-staging-any/PKGBUILD
(from rev 521783, gunicorn/trunk/PKGBUILD)
gunicorn/repos/community-staging-any/gunicorn-pytest5.patch
(from rev 521783, gunicorn/trunk/gunicorn-pytest5.patch)
Deleted:
gunicorn/repos/community-staging-any/PKGBUILD
------------------------+
PKGBUILD | 141 ++++++++++++++++++++++++-----------------------
gunicorn-pytest5.patch | 67 ++++++++++++++++++++++
2 files changed, 140 insertions(+), 68 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-11-01 13:18:19 UTC (rev 521783)
+++ PKGBUILD 2019-11-01 13:18:36 UTC (rev 521784)
@@ -1,68 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Jeremy "Ichimonji10" Audet <ichimonji10 at gmail dot com>
-# Contributor: pumpkin <pumpkin at mailoo dot org>
-# Contributor: Vsevolod Balashov <vsevolod at balashov dot name>
-
-pkgbase=gunicorn
-pkgname=(gunicorn python2-gunicorn)
-pkgver=19.9.0
-pkgrel=2
-pkgdesc='WSGI HTTP Server for UNIX'
-arch=('any')
-url='https://gunicorn.org/'
-license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools')
-checkdepends=('python2-mock' 'python-coverage' 'python2-coverage' 'python-pytest' 'python2-pytest'
- 'python-pytest-cov' 'python2-pytest-cov' 'python-pytest-runner'
- 'python2-pytest-runner')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/benoitc/$pkgbase/archive/$pkgver.tar.gz")
-sha512sums=('8d1ff775dd5c1abb8bb4c80aecacb544382e38d101f105fd0fd7eb6bf98ecb663dd533d16e7b1741d6e5ef0eb12a707ab90e0a7751356e625725f076b4dc1a30')
-
-prepare() {
- sed -e 's/==/>=/' -e 's/,<.*$//' -i gunicorn-$pkgver/requirements_test.txt
- cp -a gunicorn-$pkgver{,-py2}
-}
-
-build() {
- cd "$srcdir"/gunicorn-$pkgver
- python setup.py build
-
- cd "$srcdir"/gunicorn-$pkgver-py2
- python2 setup.py build
-}
-
-check() {
- cd "$srcdir"/gunicorn-$pkgver
- python setup.py pytest
-
- cd "$srcdir"/gunicorn-$pkgver-py2
- python2 setup.py pytest
-}
-
-package_gunicorn() {
- depends=('python-setuptools')
- optdepends=('python-eventlet: For asynchronous request handling with eventlet.'
- 'python-gevent: For asynchronous request handling with gevent.')
-
- cd $pkgbase-$pkgver
- python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
- rm -r "$pkgdir"/usr/bin/gunicorn_paster
- install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-package_python2-gunicorn() {
- depends=('python2-setuptools')
- provides=('gunicorn-python2')
- conflicts=('gunicorn-python2')
- replaces=('gunicorn-python2')
- optdepends=('python2-eventlet: For asynchronous request handling with eventlet.'
- 'python2-gevent: For asynchronous request handling with gevent.')
-
- cd $pkgbase-$pkgver-py2
- python2 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
- rm -r "$pkgdir"/usr/bin/gunicorn_paster
- mv "$pkgdir"/usr/bin/gunicorn "$pkgdir"/usr/bin/gunicorn-python2
- install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-# vim:set ts=2 sw=2 et:
Copied: gunicorn/repos/community-staging-any/PKGBUILD (from rev 521783, gunicorn/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-11-01 13:18:36 UTC (rev 521784)
@@ -0,0 +1,73 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Jeremy "Ichimonji10" Audet <ichimonji10 at gmail dot com>
+# Contributor: pumpkin <pumpkin at mailoo dot org>
+# Contributor: Vsevolod Balashov <vsevolod at balashov dot name>
+
+pkgbase=gunicorn
+pkgname=(gunicorn python2-gunicorn)
+pkgver=19.9.0
+pkgrel=3
+pkgdesc='WSGI HTTP Server for UNIX'
+arch=('any')
+url='https://gunicorn.org/'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python2-mock' 'python-coverage' 'python2-coverage' 'python-pytest' 'python2-pytest'
+ 'python-pytest-cov' 'python2-pytest-cov' 'python-pytest-runner'
+ 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/benoitc/$pkgbase/archive/$pkgver.tar.gz"
+ gunicorn-pytest5.patch)
+sha512sums=('8d1ff775dd5c1abb8bb4c80aecacb544382e38d101f105fd0fd7eb6bf98ecb663dd533d16e7b1741d6e5ef0eb12a707ab90e0a7751356e625725f076b4dc1a30'
+ 'c14fe17b247567ae096ffb1522b9dd424a2e29f3cabf2b4d8ae3b84bf17d9b1ad4abf25df2f2eed884fc931087879c6ce68c160f4f7f7074afb913cbe56546dc')
+
+prepare() {
+ (cd gunicorn-$pkgver
+ patch -p1 -i ../gunicorn-pytest5.patch # Fix test failures with pytest 5
+ )
+ sed -e 's/==/>=/' -e 's/,<.*$//' -i gunicorn-$pkgver/requirements_test.txt
+ cp -a gunicorn-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/gunicorn-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/gunicorn-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/gunicorn-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/gunicorn-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_gunicorn() {
+ depends=('python-setuptools')
+ optdepends=('python-eventlet: For asynchronous request handling with eventlet.'
+ 'python-gevent: For asynchronous request handling with gevent.')
+
+ cd $pkgbase-$pkgver
+ python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
+ rm -r "$pkgdir"/usr/bin/gunicorn_paster
+ install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-gunicorn() {
+ depends=('python2-setuptools')
+ provides=('gunicorn-python2')
+ conflicts=('gunicorn-python2')
+ replaces=('gunicorn-python2')
+ optdepends=('python2-eventlet: For asynchronous request handling with eventlet.'
+ 'python2-gevent: For asynchronous request handling with gevent.')
+
+ cd $pkgbase-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
+ rm -r "$pkgdir"/usr/bin/gunicorn_paster
+ mv "$pkgdir"/usr/bin/gunicorn "$pkgdir"/usr/bin/gunicorn-python2
+ install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
Copied: gunicorn/repos/community-staging-any/gunicorn-pytest5.patch (from rev 521783, gunicorn/trunk/gunicorn-pytest5.patch)
===================================================================
--- gunicorn-pytest5.patch (rev 0)
+++ gunicorn-pytest5.patch 2019-11-01 13:18:36 UTC (rev 521784)
@@ -0,0 +1,67 @@
+From f38f717539b1b7296720805b8ae3969c3509b9c1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Ba=C5=A1ti?= <mbasti at redhat.com>
+Date: Thu, 11 Jul 2019 19:12:16 +0200
+Subject: [PATCH] Fix pytest 5.0.0 compatibility
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+pytest.raises() returns exception info not the exception itself. They
+changed implementation of exception info, so now .value property must be
+used to get the exception instance and have proper output from str()
+method.
+
+https://github.com/pytest-dev/pytest/issues/5412
+
+Signed-off-by: Martin Bašti <mbasti at redhat.com>
+---
+ tests/test_util.py | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/tests/test_util.py b/tests/test_util.py
+index 3b8688a21..2494d2c54 100644
+--- a/tests/test_util.py
++++ b/tests/test_util.py
+@@ -29,9 +29,9 @@ def test_parse_address(test_input, expected):
+
+
+ def test_parse_address_invalid():
+- with pytest.raises(RuntimeError) as err:
++ with pytest.raises(RuntimeError) as exc_info:
+ util.parse_address('127.0.0.1:test')
+- assert "'test' is not a valid port number." in str(err)
++ assert "'test' is not a valid port number." in str(exc_info.value)
+
+
+ def test_http_date():
+@@ -63,24 +63,24 @@ def test_warn(capsys):
+ def test_import_app():
+ assert util.import_app('support:app')
+
+- with pytest.raises(ImportError) as err:
++ with pytest.raises(ImportError) as exc_info:
+ util.import_app('a:app')
+- assert 'No module' in str(err)
++ assert 'No module' in str(exc_info.value)
+
+- with pytest.raises(AppImportError) as err:
++ with pytest.raises(AppImportError) as exc_info:
+ util.import_app('support:wrong_app')
+ msg = "Failed to find application object 'wrong_app' in 'support'"
+- assert msg in str(err)
++ assert msg in str(exc_info.value)
+
+
+ def test_to_bytestring():
+ assert util.to_bytestring('test_str', 'ascii') == b'test_str'
+ assert util.to_bytestring('test_str®') == b'test_str\xc2\xae'
+ assert util.to_bytestring(b'byte_test_str') == b'byte_test_str'
+- with pytest.raises(TypeError) as err:
++ with pytest.raises(TypeError) as exc_info:
+ util.to_bytestring(100)
+ msg = '100 is not a string'
+- assert msg in str(err)
++ assert msg in str(exc_info.value)
+
+
+ @pytest.mark.parametrize('test_input, expected', [
More information about the arch-commits
mailing list