From 8fed7a86323bed214b82741fcddbed636020c050 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Oct 02 2012 17:43:07 +0000 Subject: Re-add an updated version of the epgm patch. --- diff --git a/0001-Disable-epgm-test.patch b/0001-Disable-epgm-test.patch new file mode 100644 index 0000000..63e9fa0 --- /dev/null +++ b/0001-Disable-epgm-test.patch @@ -0,0 +1,73 @@ +From 5fd3b5ddf732056a2c4d25b1edb268c1981fbd1c Mon Sep 17 00:00:00 2001 +From: Ralph Bean +Date: Tue, 2 Oct 2012 13:40:37 -0400 +Subject: [PATCH] Disable epgm test. + +--- + txzmq/test/test_pubsub.py | 39 --------------------------------------- + 1 file changed, 39 deletions(-) + +diff --git a/txzmq/test/test_pubsub.py b/txzmq/test/test_pubsub.py +index 6f98418..efa8415 100644 +--- a/txzmq/test/test_pubsub.py ++++ b/txzmq/test/test_pubsub.py +@@ -17,23 +17,6 @@ class ZmqTestSubConnection(ZmqSubConnection): + self.messages.append([tag, message]) + + +-def _detect_epgm(): +- """ +- Utility function to test for presence of epgm:// in zeromq. +- """ +- import zmq +- +- context = zmq.Context() +- socket = zmq.Socket(context, zmq.core.constants.PUB) +- +- try: +- socket.bind("epgm://127.0.0.1;239.192.1.1:5557") +- +- return True +- except zmq.core.error.ZMQError: +- return False +- +- + class ZmqConnectionTestCase(unittest.TestCase): + """ + Test case for L{zmq.twisted.connection.Connection}. +@@ -67,25 +50,6 @@ class ZmqConnectionTestCase(unittest.TestCase): + + return _wait(0.01).addCallback(check) + +- def test_send_recv_pgm(self): +- r = ZmqTestSubConnection(self.factory, ZmqEndpoint( +- ZmqEndpointType.bind, "epgm://127.0.0.1;239.192.1.1:5556")) +- +- s = ZmqPubConnection(self.factory, ZmqEndpoint( +- ZmqEndpointType.connect, "epgm://127.0.0.1;239.192.1.1:5556")) +- +- r.subscribe('tag') +- s.publish('xyz', 'different-tag') +- s.publish('abcd', 'tag1') +- +- def check(ignore): +- result = getattr(r, 'messages', []) +- expected = [['tag1', 'abcd']] +- self.failUnlessEqual( +- result, expected, "Message should have been received") +- +- return _wait(0.2).addCallback(check) +- + def test_send_recv_multiple_endpoints(self): + r = ZmqTestSubConnection( + self.factory, +@@ -110,6 +74,3 @@ class ZmqConnectionTestCase(unittest.TestCase): + sorted(result), expected, "Message should have been received") + + return _wait(0.2).addCallback(check) +- +- if not _detect_epgm(): +- test_send_recv_pgm.skip = "epgm:// not available" +-- +1.7.11.7 + diff --git a/python-txzmq.spec b/python-txzmq.spec index 419ad2f..fc6f929 100644 --- a/python-txzmq.spec +++ b/python-txzmq.spec @@ -9,6 +9,7 @@ Group: Development/Languages License: GPLv2 URL: http://pypi.python.org/pypi/%{modname} Source0: http://pypi.python.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz +Patch0: 0001-Disable-epmg-test.patch BuildArch: noarch @@ -28,6 +29,7 @@ Twisted event loop (reactor). %prep %setup -q -n %{modname}-%{version} +%patch0 -p1 -b .disable_epgm_test # Patch out the setuptools requirement on Twisted since epel doesn't ship # twisted egg-info @@ -53,7 +55,8 @@ PYTHONPATH=$(pwd) nosetests %changelog * Tue Oct 02 2012 Ralph Bean - 0.5.2-1 - Latest upstream with new socket types. -- Remove epgm-disabling patch. +- Remove old epgm-disabling patch. +- Add new egpm-disabling patch. * Sat Jul 21 2012 Fedora Release Engineering - 0.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild