[arch-commits] Commit in python-vcrpy/trunk (PKGBUILD python3.7.patch)
Felix Yan
felixonmars at archlinux.org
Sat Sep 22 06:39:17 UTC 2018
Date: Saturday, September 22, 2018 @ 06:39:16
Author: felixonmars
Revision: 383985
upgpkg: python-vcrpy 2.0.0-1
Modified:
python-vcrpy/trunk/PKGBUILD
Deleted:
python-vcrpy/trunk/python3.7.patch
-----------------+
PKGBUILD | 23 ++++++-----------------
python3.7.patch | 39 ---------------------------------------
2 files changed, 6 insertions(+), 56 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-09-22 06:24:24 UTC (rev 383984)
+++ PKGBUILD 2018-09-22 06:39:16 UTC (rev 383985)
@@ -2,7 +2,7 @@
pkgbase=python-vcrpy
pkgname=('python-vcrpy' 'python2-vcrpy')
-pkgver=1.13.0
+pkgver=2.0.0
pkgrel=1
pkgdesc='Automatically mock your HTTP interactions to simplify and speed up testing'
arch=('any')
@@ -13,29 +13,18 @@
'python2-mock')
checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-pytest-httpbin'
'python2-pytest-httpbin' 'python-mock')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/kevin1024/vcrpy/archive/v$pkgver.tar.gz"
- python3.7.patch)
-sha512sums=('dda875faa6c5e29c26c774b45b27e046437cf9add0b7e73bd5be545062dbde46b91e90fbc0dafe1efd5c76e447068fabd3018c6ff35db1e8bb009e50a72bd341'
- '369676b91ec3f0118112391d6b30bf4787211ec8fe9e35b79eb32b8179b02f70495c6b7d58e4d756c8530038a3fc7fc288cc636cd4a78193ecc8798b28d238dc')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/kevin1024/vcrpy/archive/v$pkgver.tar.gz")
+sha512sums=('1c432ad6bb30c1b832dd293efe17a8cbcd3bc63480f8de1204b89ccb0e28291e8e819c08a435a6333be41720006fc0c1e7815d0670a50594a4ebb3c5178e13ea')
-prepare() {
- patch -d vcrpy-$pkgver -p1 -i "$srcdir"/python3.7.patch
- cp -a vcrpy-$pkgver{,-py2}
-}
-
build() {
- cd "$srcdir"/vcrpy-$pkgver
+ cd vcrpy-$pkgver
python setup.py build
-
- cd "$srcdir"/vcrpy-$pkgver-py2
python2 setup.py build
}
check() {
- cd "$srcdir"/vcrpy-$pkgver
+ cd vcrpy-$pkgver
python setup.py pytest
-
- cd "$srcdir"/vcrpy-$pkgver-py2
python2 setup.py pytest
}
@@ -50,7 +39,7 @@
package_python2-vcrpy() {
depends=('python2-yaml' 'python2-wrapt' 'python2-six' 'python2-contextlib2' 'python2-mock')
- cd vcrpy-$pkgver-py2
+ cd vcrpy-$pkgver
python2 setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}
Deleted: python3.7.patch
===================================================================
--- python3.7.patch 2018-09-22 06:24:24 UTC (rev 383984)
+++ python3.7.patch 2018-09-22 06:39:16 UTC (rev 383985)
@@ -1,39 +0,0 @@
-diff --git a/tests/integration/test_urllib2.py b/tests/integration/test_urllib2.py
-index 8a633ba..3c0b021 100644
---- a/tests/integration/test_urllib2.py
-+++ b/tests/integration/test_urllib2.py
-@@ -1,6 +1,7 @@
- # -*- coding: utf-8 -*-
- '''Integration tests with urllib2'''
-
-+import ssl
- from six.moves.urllib.request import urlopen
- from six.moves.urllib_parse import urlencode
- import pytest_httpbin.certs
-@@ -12,7 +13,9 @@ from assertions import assert_cassette_has_one_response
-
-
- def urlopen_with_cafile(*args, **kwargs):
-- kwargs['cafile'] = pytest_httpbin.certs.where()
-+ context = ssl.create_default_context(cafile=pytest_httpbin.certs.where())
-+ context.check_hostname = False
-+ kwargs['context'] = context
- try:
- return urlopen(*args, **kwargs)
- except TypeError:
-diff --git a/vcr/cassette.py b/vcr/cassette.py
-index d64dec6..3b6f54e 100644
---- a/vcr/cassette.py
-+++ b/vcr/cassette.py
-@@ -136,7 +136,10 @@ class CassetteContextDecorator(object):
- except Exception:
- to_yield = coroutine.throw(*sys.exc_info())
- else:
-- to_yield = coroutine.send(to_send)
-+ try:
-+ to_yield = coroutine.send(to_send)
-+ except StopIteration:
-+ break
-
- def _handle_function(self, fn):
- with self as cassette:
More information about the arch-commits
mailing list