[python-txzmq/el6] Revert mistaken merge of rawhide into el6.
Ralph Bean
ralph at fedoraproject.org
Wed Aug 20 20:06:22 UTC 2014
commit b6e9a1c0adc7dbcdf697393117c2c697972158ba
Author: Ralph Bean <rbean at redhat.com>
Date: Wed Aug 20 15:54:26 2014 -0400
Revert mistaken merge of rawhide into el6.
.gitignore | 3 -
0001-Disable-epgm-test.patch | 48 ++++++++++++------
0002-Support-older-pyzmq.patch | 25 ++++++++++
python-txzmq.spec | 103 +++++-----------------------------------
sources | 2 +-
5 files changed, 70 insertions(+), 111 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c8be59b..244f04b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,3 @@
/txZMQ-0.5.2.tar.gz
/txZMQ-0.6.1.tar.gz
/txZMQ-0.6.2.tar.gz
-/txZMQ-0.7.0.tar.gz
-/txZMQ-0.7.2.tar.gz
-/txZMQ-0.7.3.tar.gz
diff --git a/0001-Disable-epgm-test.patch b/0001-Disable-epgm-test.patch
index 69bdc85..c7eaf76 100644
--- a/0001-Disable-epgm-test.patch
+++ b/0001-Disable-epgm-test.patch
@@ -1,17 +1,17 @@
-From b9cc1b4832f4ebdc644a5aa2cf02e4ac40c56451 Mon Sep 17 00:00:00 2001
+From d26b799ace81fcdc00589d9242e3a84aa05452a4 Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean at redhat.com>
-Date: Tue, 28 Jan 2014 16:18:17 -0500
-Subject: [PATCH] Disable epgm test
+Date: Thu, 11 Apr 2013 01:01:57 -0400
+Subject: [PATCH 1/2] Disable epgm test
---
- txzmq/test/test_pubsub.py | 26 --------------------------
- 1 file changed, 26 deletions(-)
+ txzmq/test/test_pubsub.py | 42 ------------------------------------------
+ 1 file changed, 42 deletions(-)
diff --git a/txzmq/test/test_pubsub.py b/txzmq/test/test_pubsub.py
-index 86a0238..f2fb12e 100644
+index 2010c01..df4f797 100644
--- a/txzmq/test/test_pubsub.py
+++ b/txzmq/test/test_pubsub.py
-@@ -19,21 +19,6 @@ class ZmqTestSubConnection(ZmqSubConnection):
+@@ -23,23 +23,6 @@ class ZmqTestSubConnection(ZmqSubConnection):
self.messages.append([tag, message])
@@ -22,7 +22,7 @@ index 86a0238..f2fb12e 100644
- import zmq
-
- context = zmq.Context()
-- socket = zmq.Socket(context, zmq.constants.PUB)
+- socket = zmq.Socket(context, zmq.core.constants.PUB)
-
- try:
- socket.bind("epgm://127.0.0.1;239.192.1.1:5557")
@@ -30,10 +30,12 @@ index 86a0238..f2fb12e 100644
- return True
- except ZMQError:
- return False
-
-
+-
+-
class ZmqConnectionTestCase(unittest.TestCase):
-@@ -81,14 +66,6 @@ class ZmqConnectionTestCase(unittest.TestCase):
+ """
+ Test case for L{zmq.twisted.connection.Connection}.
+@@ -85,28 +68,6 @@ class ZmqConnectionTestCase(unittest.TestCase):
return _wait(0.01).addCallback(publish) \
.addCallback(lambda _: _wait(0.01)).addCallback(check)
@@ -45,10 +47,24 @@ index 86a0238..f2fb12e 100644
- ZmqEndpointType.connect, "epgm://127.0.0.1;239.192.1.1:5556"))
-
- r.subscribe('tag')
-
- def publish(ignore):
- s.publish('xyz', 'different-tag')
-@@ -130,6 +107,3 @@ class ZmqConnectionTestCase(unittest.TestCase):
+-
+- def publish(ignore):
+- 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(publish) \
+- .addCallback(lambda _: _wait(0.2)).addCallback(check)
+-
+ def test_send_recv_multiple_endpoints(self):
+ r = ZmqTestSubConnection(
+ self.factory,
+@@ -134,6 +95,3 @@ class ZmqConnectionTestCase(unittest.TestCase):
return _wait(0.1).addCallback(publish) \
.addCallback(lambda _: _wait(0.1)).addCallback(check)
@@ -56,5 +72,5 @@ index 86a0238..f2fb12e 100644
- if not _detect_epgm():
- test_send_recv_pgm.skip = "epgm:// not available"
--
-1.8.5.3
+1.8.1.4
diff --git a/0002-Support-older-pyzmq.patch b/0002-Support-older-pyzmq.patch
new file mode 100644
index 0000000..ea9cc0a
--- /dev/null
+++ b/0002-Support-older-pyzmq.patch
@@ -0,0 +1,25 @@
+From acef71366d932797a50ee787ef8463f0ca385315 Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Thu, 11 Apr 2013 01:02:53 -0400
+Subject: [PATCH 2/2] Support older pyzmq.
+
+---
+ txzmq/connection.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/txzmq/connection.py b/txzmq/connection.py
+index 11039fb..75c44a3 100644
+--- a/txzmq/connection.py
++++ b/txzmq/connection.py
+@@ -18,7 +18,7 @@ PYZMQ13 = False
+ try:
+ from zmq.core import version
+
+- ZMQ3 = version.zmq_version_info()[0] >= 3
++ ZMQ3 = int(version.zmq_version().split('.')[0]) >= 3
+ except ImportError:
+ try:
+ # In pyzmq-13.0.0, this moved again.
+--
+1.8.1.4
+
diff --git a/python-txzmq.spec b/python-txzmq.spec
index e4b05dd..da6c4ef 100644
--- a/python-txzmq.spec
+++ b/python-txzmq.spec
@@ -1,20 +1,8 @@
-%if 0%{?fedora}
-# Well, damnit. I did the work to port this to python3, but we don't have
-# python3-twisted-core in Fedora yet. Disabling this for now.
-%global with_python3 0
-%endif
-
-%if 0%{?rhel} && 0%{?rhel} <= 6
-%{!?__python2: %global __python2 /usr/bin/python2}
-%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%endif
-
%global modname txZMQ
Name: python-txzmq
-Version: 0.7.3
-Release: 1%{?dist}
+Version: 0.6.2
+Release: 3%{?dist}
Summary: Twisted bindings for ZeroMQ
Group: Development/Languages
@@ -22,51 +10,27 @@ 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-epgm-test.patch
+Patch1: 0002-Support-older-pyzmq.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-nose
-BuildRequires: python-zmq >= 13.0.0
+BuildRequires: python-zmq
BuildRequires: python-twisted-core
-BuildRequires: python-six
-Requires: python-zmq >= 13.0.0
+Requires: python-zmq
Requires: python-twisted-core
-Requires: python-six
-
-%if 0%{?with_python3}
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-BuildRequires: python3-nose
-BuildRequires: python3-zmq >= 13.0.0
-BuildRequires: python3-twisted-core
-BuildRequires: python3-six
-%endif
%description
-txZMQ allows to integrate easily ZeroMQ sockets into Twisted event loop
-(reactor).
-
-%if 0%{?with_python3}
-%package -n python3-txzmq
-Summary: Twisted bindings for ZeroMQ
-Group: Development/Languages
-
-Requires: python3-zmq >= 13.0.0
-Requires: python3-twisted-core
-Requires: python3-six
-
-%description -n python3-txzmq
-txZMQ allows to integrate easily ZeroMQ sockets into Twisted event loop
-(reactor).
-%endif
-
+txZMQ allows to integrate easily `ZeroMQ <http://zeromq.org>`_ sockets into
+Twisted event loop (reactor).
%prep
%setup -q -n %{modname}-%{version}
%patch0 -p1 -b .disable_epgm_test
+%patch1 -p1 -b .disable-older-pyzmq
# Patch out the setuptools requirement on Twisted since epel doesn't ship
# twisted egg-info
@@ -74,64 +38,21 @@ txZMQ allows to integrate easily ZeroMQ sockets into Twisted event loop
%{__sed} -i 's/"Twisted",//' setup.py
%endif
-%if 0%{?with_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-%endif
-
%build
-%{__python2} setup.py build
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py build
-popd
-%endif
+%{__python} setup.py build
%check
PYTHONPATH=$(pwd) nosetests
-%if 0%{?with_python3}
-pushd %{py3dir}
-PYTHONPATH=$(pwd) nosetests-%{python3_version}
-popd
-%endif
-
%install
-%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-popd
-%endif
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files
%doc README.rst LICENSE.txt
-%{python2_sitelib}/txzmq/
-%{python2_sitelib}/txZMQ-%{version}*.egg-info
-
-%if 0%{?with_python3}
-%files -n python3-txzmq
-%doc README.rst LICENSE.txt
-%{python3_sitelib}/txzmq/
-%{python3_sitelib}/txZMQ-%{version}*.egg-info
-%endif
+%{python_sitelib}/txzmq/
+%{python_sitelib}/txZMQ-%{version}*.egg-info
%changelog
-* Wed Aug 20 2014 Ralph Bean <rbean at redhat.com> - 0.7.3-1
-- Latest upstream with support for zmq reconnect options.
-
-* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Sat Apr 19 2014 Ralph Bean <rbean at redhat.com> - 0.7.2-1
-- Latest upstream with python3 support -- woot, woot!
-
-* Tue Jan 28 2014 Ralph Bean <rbean at redhat.com> - 0.7.0-1
-- Latest upstream.
-- Dropped support for older pyzmq.
-
* Tue Jan 14 2014 Ralph Bean <rbean at redhat.com> - 0.6.2-3
- Narrow dep down to the twisted-core subpackage.
diff --git a/sources b/sources
index 015eee8..68f2abc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8064422e590f859bf9c5aedf94af5a5c txZMQ-0.7.3.tar.gz
+2e349d88f3bcbfe890fe23d68129d9fa txZMQ-0.6.2.tar.gz
More information about the scm-commits
mailing list