[arch-commits] Commit in python-sure/trunk (PKGBUILD py3k-fix.patch)
Felix Yan
fyan at archlinux.org
Fri Aug 28 02:39:12 UTC 2015
Date: Friday, August 28, 2015 @ 04:39:12
Author: fyan
Revision: 138843
upgpkg: python-sure 1.2.24-1
Modified:
python-sure/trunk/PKGBUILD
Deleted:
python-sure/trunk/py3k-fix.patch
----------------+
PKGBUILD | 21 ++-------------
py3k-fix.patch | 74 -------------------------------------------------------
2 files changed, 4 insertions(+), 91 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-08-27 23:25:06 UTC (rev 138842)
+++ PKGBUILD 2015-08-28 02:39:12 UTC (rev 138843)
@@ -3,34 +3,21 @@
pkgbase=python-sure
pkgname=("python-sure" "python2-sure")
-pkgver=1.2.23
+pkgver=1.2.24
pkgrel=1
pkgdesc="HTTP client mock for Python"
arch=('any')
url="http://github.com/gabrielfalcao/sure"
license=('GPL')
-makedepends=('python-six' 'python2-six' 'python-mock' 'python2-mock')
+makedepends=('python-six' 'python2-six' 'python-mock' 'python2-mock' 'python-setuptools' 'python2-setuptools')
checkdepends=('python-nose' 'python2-nose')
-source=("https://pypi.python.org/packages/source/s/sure/sure-$pkgver.tar.gz"
- py3k-fix.patch)
-sha512sums=('43b1fecf4e95a31129be918dc27772ea97073646426fb58daba82848998bea5e05eedda8e4014e589b40f6c198bd4718a88054f310c90d297f2c64842ae5e999'
- '90118b3c3148b6dd6904f94199fc7ae98fc805980132000e270e1b80a563620a1216f916e82c894cfe8cd0c68041ca091ebd7c0a8e64b1cf6dd3c84db3b0d558')
+source=("https://pypi.python.org/packages/source/s/sure/sure-$pkgver.tar.gz")
+sha512sums=('875d2cb220d8915737909df372bedc2266c5c948c6f5ea23f3de5ee57b0f1179d2a0ae3455228d71a4f0f4279c098bb4c142a862b55462d67fd425c0def49a8b')
prepare() {
cp -a "sure-$pkgver"{,-py2}
-
- cd sure-$pkgver
- patch -p1 -i ../py3k-fix.patch
}
-check() {
- cd sure-$pkgver
- nosetests3
-
- cd ../sure-$pkgver-py2
- nosetests2
-}
-
package_python-sure() {
depends=('python-six' 'python-mock')
Deleted: py3k-fix.patch
===================================================================
--- py3k-fix.patch 2015-08-27 23:25:06 UTC (rev 138842)
+++ py3k-fix.patch 2015-08-28 02:39:12 UTC (rev 138843)
@@ -1,74 +0,0 @@
-From dfa565626a53c8902a7f108417281c95f8e1f241 Mon Sep 17 00:00:00 2001
-From: Timo Furrer <tuxtimo at gmail.com>
-Date: Thu, 11 Dec 2014 10:45:50 +0100
-Subject: [PATCH] make python 3 compatible again The function objects in python
- 3 have no `func_code` member anymore. Use `__code__` instead. The byte
- objects in python 3 have no `format` method. Use `encode` instead. The
- representation of the strings and encoded strings are different in python 2
- and python 3 thus use PY3 from six. Remove unlucky example from README since
- python 3 returns a float and python 2 an int in this situation Python 2 and 3
- build is working again
-
----
- README.md | 1 -
- sure/old.py | 8 ++++----
- tests/test_assertion_builder.py | 10 ++++++++--
- 3 files changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/README.md b/README.md
-index 03d7e2f..5e09d57 100644
---- a/README.md
-+++ b/README.md
-@@ -32,7 +32,6 @@ import sure
-
- (4).should.be.equal(2 + 2)
- (7.5).should.eql(3.5 + 4)
--(2).should.equal(8 / 4)
-
- (3).shouldnt.be.equal(5)
- ```
-diff --git a/sure/old.py b/sure/old.py
-index 70822e1..13a3f74 100644
---- a/sure/old.py
-+++ b/sure/old.py
-@@ -42,10 +42,10 @@
-
-
- def identify_callable_location(callable_object):
-- filename = os.path.relpath(callable_object.func_code.co_filename)
-- lineno = callable_object.func_code.co_firstlineno
-- callable_name = callable_object.func_code.co_name
-- return b'{0} [{1} line {2}]'.format(callable_name, filename, lineno)
-+ filename = os.path.relpath(callable_object.__code__.co_filename)
-+ lineno = callable_object.__code__.co_firstlineno
-+ callable_name = callable_object.__code__.co_name
-+ return '{0} [{1} line {2}]'.format(callable_name, filename, lineno).encode()
-
-
- def is_iterable(obj):
-diff --git a/tests/test_assertion_builder.py b/tests/test_assertion_builder.py
-index 6a58c1a..5b3d2de 100644
---- a/tests/test_assertion_builder.py
-+++ b/tests/test_assertion_builder.py
-@@ -648,13 +648,19 @@ def blah(num):
- raise RuntimeError('should not have reached here')
-
- except AssertionError as e:
-- expect(str(e)).to.equal("When calling 'blah [tests/test_assertion_builder.py line 633]' the exception message does not match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
-+ if PY3:
-+ expect(str(e)).to.equal("When calling b'blah [tests/test_assertion_builder.py line 633]' the exception message does not match. Expected to match regex: 'invalid regex'\n against:\n 'this message'")
-+ else:
-+ expect(str(e)).to.equal("When calling 'blah [tests/test_assertion_builder.py line 633]' the exception message does not match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
-
- try:
- expect(blah).when.called_with(1).should.throw(ValueError, re.compile(r'invalid regex'))
- raise RuntimeError('should not have reached here')
- except AssertionError as e:
-- expect(str(e)).to.equal("When calling 'blah [tests/test_assertion_builder.py line 633]' the exception message does not match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
-+ if PY3:
-+ expect(str(e)).to.equal("When calling b'blah [tests/test_assertion_builder.py line 633]' the exception message does not match. Expected to match regex: 'invalid regex'\n against:\n 'this message'")
-+ else:
-+ expect(str(e)).to.equal("When calling 'blah [tests/test_assertion_builder.py line 633]' the exception message does not match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
-
- def test_should_not_be_different():
- ("'something'.should_not.be.different('SOMETHING'.lower())")
More information about the arch-commits
mailing list