[arch-commits] Commit in python-sure/repos/community-any (4 files)

Felix Yan fyan at archlinux.org
Wed Jul 22 06:04:25 UTC 2015


    Date: Wednesday, July 22, 2015 @ 08:04:25
  Author: fyan
Revision: 137254

archrelease: copy trunk to community-any

Added:
  python-sure/repos/community-any/PKGBUILD
    (from rev 137253, python-sure/trunk/PKGBUILD)
  python-sure/repos/community-any/py3k-fix.patch
    (from rev 137253, python-sure/trunk/py3k-fix.patch)
Deleted:
  python-sure/repos/community-any/PKGBUILD
  python-sure/repos/community-any/py3k-fix.patch

----------------+
 PKGBUILD       |   94 +++++++++++++++++-----------------
 py3k-fix.patch |  148 +++++++++++++++++++++++++++----------------------------
 2 files changed, 121 insertions(+), 121 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-07-22 06:02:32 UTC (rev 137253)
+++ PKGBUILD	2015-07-22 06:04:25 UTC (rev 137254)
@@ -1,47 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-sure
-pkgname=("python-sure" "python2-sure")
-pkgver=1.2.12
-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')
-checkdepends=('python-nose' 'python2-nose')
-source=("https://pypi.python.org/packages/source/s/sure/sure-$pkgver.tar.gz"
-        py3k-fix.patch)
-sha512sums=('58895ae25cc9154130f51526a8dd6f53c3286329baca340fc18bbdfad12069ca95f5029724506e889ebd866d56a8dfa3c4a4495473ce63212faf6153125ba38e'
-            '90118b3c3148b6dd6904f94199fc7ae98fc805980132000e270e1b80a563620a1216f916e82c894cfe8cd0c68041ca091ebd7c0a8e64b1cf6dd3c84db3b0d558')
-
-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')
-
-  cd sure-$pkgver
-  LC_CTYPE=en_US.UTF-8 python3 setup.py install --root="${pkgdir}" --optimize=1
-}
-
-package_python2-sure() {
-  depends=('python2-six' 'python2-mock')
-
-  cd sure-$pkgver-py2
-  LC_CTYPE=en_US.UTF-8 python2 setup.py install --root="${pkgdir}" --optimize=1
-}
-

Copied: python-sure/repos/community-any/PKGBUILD (from rev 137253, python-sure/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-07-22 06:04:25 UTC (rev 137254)
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-sure
+pkgname=("python-sure" "python2-sure")
+pkgver=1.2.13
+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')
+checkdepends=('python-nose' 'python2-nose')
+source=("https://pypi.python.org/packages/source/s/sure/sure-$pkgver.tar.gz"
+        py3k-fix.patch)
+sha512sums=('751ab46d0b13541374c8471c6e3bdeb48b4709fab5c33f0dd3894cb61ea10e3932f66596f219f442a26b8bc41b8015e0e830728b0fc48cf5f227df6bf632ce44'
+            '90118b3c3148b6dd6904f94199fc7ae98fc805980132000e270e1b80a563620a1216f916e82c894cfe8cd0c68041ca091ebd7c0a8e64b1cf6dd3c84db3b0d558')
+
+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')
+
+  cd sure-$pkgver
+  LC_CTYPE=en_US.UTF-8 python3 setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-sure() {
+  depends=('python2-six' 'python2-mock')
+
+  cd sure-$pkgver-py2
+  LC_CTYPE=en_US.UTF-8 python2 setup.py install --root="${pkgdir}" --optimize=1
+}
+

Deleted: py3k-fix.patch
===================================================================
--- py3k-fix.patch	2015-07-22 06:02:32 UTC (rev 137253)
+++ py3k-fix.patch	2015-07-22 06:04:25 UTC (rev 137254)
@@ -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())")

Copied: python-sure/repos/community-any/py3k-fix.patch (from rev 137253, python-sure/trunk/py3k-fix.patch)
===================================================================
--- py3k-fix.patch	                        (rev 0)
+++ py3k-fix.patch	2015-07-22 06:04:25 UTC (rev 137254)
@@ -0,0 +1,74 @@
+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