From 44be832c5708baadd146cb954befbc3dcad8d463 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 11 Nov 2014 11:52:45 -0500 Subject: prepare for upgrade to new upstream --- debian/patches/cffi-fix.patch | 69 ----------------------------------- debian/patches/monitor-test.patch | 36 ------------------ debian/patches/noncopysend-test.patch | 20 ---------- debian/patches/series | 3 -- 4 files changed, 128 deletions(-) delete mode 100644 debian/patches/cffi-fix.patch delete mode 100644 debian/patches/monitor-test.patch delete mode 100644 debian/patches/noncopysend-test.patch delete mode 100644 debian/patches/series (limited to 'debian/patches') diff --git a/debian/patches/cffi-fix.patch b/debian/patches/cffi-fix.patch deleted file mode 100644 index fccf587..0000000 --- a/debian/patches/cffi-fix.patch +++ /dev/null @@ -1,69 +0,0 @@ -Description: check package root for cffi binaries - cffi checks __pycache__ for binaries which is cleaned by pypy installation so - packages can't ship in there. - Instead ship in package root and patch module finding to look in there. - Also use fixed path in a place passed to cffi to get the same checksum - in build and install. After it is installed no build is needed so it doesn't - matter if its wrong. - This patch assumes pypy 2.2 api, won't work with 2.1 as so_suffices is no - list. -Bug: https://bitbucket.org/cffi/cffi/issue/109/enable-sane-packaging-for-cffi - ---- a/zmq/backend/cffi/__init__.py -+++ b/zmq/backend/cffi/__init__.py -@@ -3,6 +3,40 @@ - # Copyright (C) PyZMQ Developers - # Distributed under the terms of the Modified BSD License. - -+import imp -+import os.path -+import sys -+ -+import cffi.vengine_cpy -+import cffi.vengine_gen -+_ma_triplet = None -+ -+def vengine_gen_find_module(self, module_name, path, so_suffixes): -+ global _ma_triplet -+ if _ma_triplet is None: -+ try: -+ import subprocess as sp -+ p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE) -+ _ma_triplet = str(p.communicate()[0].decode().strip()) -+ except: -+ import warnings -+ warnings.warn('failed to detect multiarch paths, please install gcc') -+ -+ for so_suffix in so_suffixes + ['.%s-%s.so' % (imp.get_tag(), _ma_triplet)]: -+ basename = module_name + so_suffix -+ if path is None: -+ path = sys.path -+ # import from non root package would try __pycache__ which is -+ # cleaned by pypy installation -+ path.insert(0, "/usr/lib/pypy/dist-packages/zmq/backend/cffi") -+ for dirname in path: -+ filename = os.path.join(dirname, basename) -+ if os.path.isfile(filename): -+ return filename -+ -+ -+cffi.vengine_gen.VGenericEngine.find_module = vengine_gen_find_module -+ - from zmq.backend.cffi import (constants, error, message, context, socket, - _poll, devices, utils) - ---- a/zmq/backend/cffi/_cffi.py -+++ b/zmq/backend/cffi/_cffi.py -@@ -106,10 +106,10 @@ int get_ipc_path_max_len(void); - - def load_compiler_config(): - import zmq -- zmq_dir = dirname(zmq.__file__) -+ zmq_dir = "zmq" - zmq_parent = dirname(zmq_dir) - -- fname = join(zmq_dir, 'utils', 'compiler.json') -+ fname = join(dirname(zmq.__file__), 'utils', 'compiler.json') - if os.path.exists(fname): - with open(fname) as f: - cfg = json.load(f) diff --git a/debian/patches/monitor-test.patch b/debian/patches/monitor-test.patch deleted file mode 100644 index 578484e..0000000 --- a/debian/patches/monitor-test.patch +++ /dev/null @@ -1,36 +0,0 @@ -Description: handle freebsd connecting without delay -Bug: https://github.com/zeromq/pyzmq/pull/558 ---- a/zmq/tests/test_monitor.py -+++ b/zmq/tests/test_monitor.py -@@ -35,11 +35,13 @@ class TestSocketMonitor(BaseZMQTestCase) - # test receive event for connect event - s_rep.connect("tcp://127.0.0.1:6666") - m = recv_monitor_message(s_event) -- self.assertEqual(m['event'], zmq.EVENT_CONNECT_DELAYED) -- self.assertEqual(m['endpoint'], b"tcp://127.0.0.1:6666") -- # test receive event for connected event -- m = recv_monitor_message(s_event) -+ if m['event'] == zmq.EVENT_CONNECT_DELAYED: -+ self.assertEqual(m['endpoint'], b"tcp://127.0.0.1:6666") -+ # test receive event for connected event -+ m = recv_monitor_message(s_event) - self.assertEqual(m['event'], zmq.EVENT_CONNECTED) -+ self.assertEqual(m['endpoint'], b"tcp://127.0.0.1:6666") -+ - - @skip_lt_4 - def test_monitor_connected(self): -@@ -56,8 +58,9 @@ class TestSocketMonitor(BaseZMQTestCase) - # test receive event for connect event - s_rep.connect("tcp://127.0.0.1:6667") - m = recv_monitor_message(s_event) -- self.assertEqual(m['event'], zmq.EVENT_CONNECT_DELAYED) -- self.assertEqual(m['endpoint'], b"tcp://127.0.0.1:6667") -- # test receive event for connected event -- m = recv_monitor_message(s_event) -+ if m['event'] == zmq.EVENT_CONNECT_DELAYED: -+ self.assertEqual(m['endpoint'], b"tcp://127.0.0.1:6667") -+ # test receive event for connected event -+ m = recv_monitor_message(s_event) - self.assertEqual(m['event'], zmq.EVENT_CONNECTED) -+ self.assertEqual(m['endpoint'], b"tcp://127.0.0.1:6667") diff --git a/debian/patches/noncopysend-test.patch b/debian/patches/noncopysend-test.patch deleted file mode 100644 index 4880ae1..0000000 --- a/debian/patches/noncopysend-test.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: don't use uninitialized memory for test - the memory could contain signalling NaN which crashes sparc python -Author: Julian Taylor -Forwarded: not-needed - ---- a/zmq/tests/test_message.py -+++ b/zmq/tests/test_message.py -@@ -324,10 +324,8 @@ class TestFrame(BaseZMQTestCase): - for i in range(1,len(shapes)+1): - shape = shapes[:i] - for dt in dtypes: -- A = numpy.empty(shape, dtype=dt) -- while numpy.isnan(A).any(): -- # don't let nan sneak in -- A = numpy.ndarray(shape, dtype=dt) -+ A = numpy.random.uniform(-10000000, -+ 1000000, size=shape).astype(dt) - a.send(A, copy=False) - msg = b.recv(copy=False) - diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 0d2af1f..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,3 +0,0 @@ -noncopysend-test.patch -cffi-fix.patch -monitor-test.patch -- cgit v1.2.3