[arch-commits] Commit in python-restkit/trunk (2 files)

Antonio Rojas arojas at archlinux.org
Sat Dec 1 23:00:19 UTC 2018


    Date: Saturday, December 1, 2018 @ 23:00:18
  Author: arojas
Revision: 410739

PIE rebuild

Added:
  python-restkit/trunk/restkit-disable-tests-needing-internet-connection.patch
Modified:
  python-restkit/trunk/PKGBUILD

---------------------------------------------------------+
 PKGBUILD                                                |    9 +-
 restkit-disable-tests-needing-internet-connection.patch |   53 ++++++++++++++
 2 files changed, 59 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-12-01 22:52:40 UTC (rev 410738)
+++ PKGBUILD	2018-12-01 23:00:18 UTC (rev 410739)
@@ -3,7 +3,7 @@
 pkgbase=python-restkit
 pkgname=('python2-restkit')
 pkgver=4.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc="An HTTP resource kit for Python"
 arch=('any')
 license=('MIT')
@@ -11,11 +11,14 @@
 makedepends=('python-setuptools' 'python2-setuptools' 'python-http-parser' 'python2-http-parser'
              'python-socketpool' 'python2-socketpool' 'git')
 checkdepends=('python-nose' 'python2-nose' 'python-webob' 'python2-webob')
-source=("git+https://github.com/benoitc/restkit.git#tag=$pkgver")
-sha512sums=('SKIP')
+source=("git+https://github.com/benoitc/restkit.git#tag=$pkgver"
+        restkit-disable-tests-needing-internet-connection.patch)
+sha512sums=('SKIP'
+            '56c597996d3f1bf3e5ddf1b09a0663e531cef290639eba4357dc2873a03fd7f19e5432bd085fcd9e9b97c1443f283eff54628c99f6f4494d4e905d366bc021fd')
 
 prepare() {
   sed -i '/data_files/d' restkit/setup.py
+  (cd restkit && patch -p0 -i ../restkit-disable-tests-needing-internet-connection.patch) # Disable tests that rely on broken website (Fedora)
   cp -a restkit{,-py2}
 }
 

Added: restkit-disable-tests-needing-internet-connection.patch
===================================================================
--- restkit-disable-tests-needing-internet-connection.patch	                        (rev 0)
+++ restkit-disable-tests-needing-internet-connection.patch	2018-12-01 23:00:18 UTC (rev 410739)
@@ -0,0 +1,53 @@
+--- tests/004-test-client.py.orig	2012-01-20 17:39:18.000000000 +0100
++++ tests/004-test-client.py	2012-03-23 11:51:14.079946644 +0100
+@@ -112,29 +112,29 @@
+     t.eq(r.body_string(), "ok")
+     
+ 
+- at t.client_request('http://e-engura.com/images/logo.gif')
+-def test_007(u, c):
+-    r = c.request(u)
+-    print r.status
+-    t.eq(r.status_int, 200)
+-    fd, fname = tempfile.mkstemp(suffix='.gif')
+-    f = os.fdopen(fd, "wb")
+-    f.write(r.body_string())
+-    f.close()
+-    t.eq(imghdr.what(fname), 'gif')
++#@t.client_request('http://e-engura.com/images/logo.gif')
++#def test_007(u, c):
++#    r = c.request(u)
++#    print r.status
++#    t.eq(r.status_int, 200)
++#    fd, fname = tempfile.mkstemp(suffix='.gif')
++#    f = os.fdopen(fd, "wb")
++#    f.write(r.body_string())
++#    f.close()
++#    t.eq(imghdr.what(fname), 'gif')
+     
+ 
+- at t.client_request('http://e-engura.com/images/logo.gif')
+-def test_008(u, c):
+-    r = c.request(u)
+-    t.eq(r.status_int, 200)
+-    fd, fname = tempfile.mkstemp(suffix='.gif')
+-    f = os.fdopen(fd, "wb")
+-    with r.body_stream() as body:
+-        for block in body:
+-            f.write(block)
+-    f.close()
+-    t.eq(imghdr.what(fname), 'gif')
++#@t.client_request('http://e-engura.com/images/logo.gif')
++#def test_008(u, c):
++#    r = c.request(u)
++#    t.eq(r.status_int, 200)
++#    fd, fname = tempfile.mkstemp(suffix='.gif')
++#    f = os.fdopen(fd, "wb")
++#    with r.body_stream() as body:
++#        for block in body:
++#            f.write(block)
++#    f.close()
++#    t.eq(imghdr.what(fname), 'gif')
+     
+ 
+ @t.client_request('/redirect')



More information about the arch-commits mailing list