[Python-modules-commits] r27058 - in packages/pyzmq/trunk/debian (7 files)
jtaylor-guest at users.alioth.debian.org
jtaylor-guest at users.alioth.debian.org
Sat Jan 4 20:30:03 UTC 2014
Date: Saturday, January 4, 2014 @ 20:30:01
Author: jtaylor-guest
Revision: 27058
New upstream release
drop upstream applied workaround-gevent.patch
update cffi fix patch for to deal with filename in checksum
adapt rules to new backend file locations
Modified:
packages/pyzmq/trunk/debian/changelog
packages/pyzmq/trunk/debian/patches/cffi-fix.patch
packages/pyzmq/trunk/debian/patches/noncopysend-test.patch
packages/pyzmq/trunk/debian/patches/series
packages/pyzmq/trunk/debian/rules
Deleted:
packages/pyzmq/trunk/debian/patches/clean-all.patch
packages/pyzmq/trunk/debian/patches/workaround-gevent.patch
Modified: packages/pyzmq/trunk/debian/changelog
===================================================================
--- packages/pyzmq/trunk/debian/changelog 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/changelog 2014-01-04 20:30:01 UTC (rev 27058)
@@ -1,5 +1,7 @@
-pyzmq (13.1.0-2) UNRELEASED; urgency=low
+pyzmq (14.0.1-1) UNRELEASED; urgency=low
+ * New upstream release
+ drop upstream applied workaround-gevent.patch
* provide pypy-zmq package
* build package with pybuild
* bump cython build depend version to required >= 0.16 (Closes: #721711)
Modified: packages/pyzmq/trunk/debian/patches/cffi-fix.patch
===================================================================
--- packages/pyzmq/trunk/debian/patches/cffi-fix.patch 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/patches/cffi-fix.patch 2014-01-04 20:30:01 UTC (rev 27058)
@@ -2,10 +2,13 @@
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.
Bug: https://bitbucket.org/cffi/cffi/issue/109/enable-sane-packaging-for-cffi
---- a/zmq/cffi_core/__init__.py
-+++ b/zmq/cffi_core/__init__.py
+--- a/zmq/backend/cffi/__init__.py
++++ b/zmq/backend/cffi/__init__.py
@@ -9,6 +9,40 @@
# the file COPYING.BSD, distributed as part of this software.
#-----------------------------------------------------------------------------
@@ -16,26 +19,26 @@
+
+import cffi.vengine_cpy
+import cffi.vengine_gen
-+ma_triplet = None
++_ma_triplet = None
+
+def vengine_gen_find_module(self, module_name, path, so_suffixes):
-+ global ma_triplet
-+ if ma_triplet is None:
++ 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())
++ _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)]:
++ 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/cffi_core")
++ 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):
@@ -44,6 +47,17 @@
+
+cffi.vengine_gen.VGenericEngine.find_module = vengine_gen_find_module
+
- from zmq.cffi_core import (constants, error, message, context, socket,
- _poll, devices, stopwatch)
+ 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
+@@ -196,7 +196,7 @@ else:
+
+
+ ffi.cdef(functions)
+-zmq_utils = os.path.dirname(zmq.utils.__file__)
++zmq_utils = "zmq/utils"
+
+ C = ffi.verify('''
+ #include <stdio.h>
Deleted: packages/pyzmq/trunk/debian/patches/clean-all.patch
===================================================================
--- packages/pyzmq/trunk/debian/patches/clean-all.patch 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/patches/clean-all.patch 2014-01-04 20:30:01 UTC (rev 27058)
@@ -1,58 +0,0 @@
-Description: support clean -a required by dh_auto_clean
- also clean up pyc in buildutils
-Author: Julian Taylor <jtaylor.debian at googlemail.com>
-Forwarded: not-needed
-
---- a/setup.py
-+++ b/setup.py
-@@ -716,16 +716,34 @@ class GitRevisionCommand(Command):
-
- class CleanCommand(Command):
- """Custom distutils command to clean the .so and .pyc files."""
-+ user_options = [('all', 'a',
-+ "remove all build output, not just temporary by-products")
-+ ]
-
-- user_options = [ ]
-+ boolean_options = ['all']
-
- def initialize_options(self):
-+ self.all = None
-+
-+ def finalize_options(self):
-+ pass
-+
-+ def run(self):
- self._clean_me = []
-- self._clean_trees = []
-+ self._clean_trees = []
-+ for root, dirs, files in list(os.walk('buildutils')):
-+ for f in files:
-+ if os.path.splitext(f)[-1] == '.pyc':
-+ self._clean_me.append(pjoin(root, f))
-+
- for root, dirs, files in list(os.walk('zmq')):
- for f in files:
- if os.path.splitext(f)[-1] in ('.pyc', '.so', '.o', '.pyd'):
- self._clean_me.append(pjoin(root, f))
-+ # remove generated cython files
-+ if self.all and os.path.splitext(f)[-1] == '.c':
-+ self._clean_me.append(pjoin(root, f))
-+
- for d in dirs:
- if d == '__pycache__':
- self._clean_trees.append(pjoin(root, d))
-@@ -736,13 +754,6 @@ class CleanCommand(Command):
-
- bundled = glob(pjoin('zmq', 'libzmq*'))
- self._clean_me.extend(bundled)
--
--
--
-- def finalize_options(self):
-- pass
--
-- def run(self):
- for clean_me in self._clean_me:
- try:
- os.unlink(clean_me)
Modified: packages/pyzmq/trunk/debian/patches/noncopysend-test.patch
===================================================================
--- packages/pyzmq/trunk/debian/patches/noncopysend-test.patch 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/patches/noncopysend-test.patch 2014-01-04 20:30:01 UTC (rev 27058)
@@ -5,12 +5,12 @@
--- a/zmq/tests/test_message.py
+++ b/zmq/tests/test_message.py
-@@ -321,10 +321,8 @@ class TestFrame(BaseZMQTestCase):
+@@ -340,10 +340,8 @@ class TestFrame(BaseZMQTestCase):
for i in range(1,len(shapes)+1):
shape = shapes[:i]
for dt in dtypes:
- A = numpy.ndarray(shape, dtype=dt)
-- while not (A < 1e400).all():
+- while numpy.isnan(A).any():
- # don't let nan sneak in
- A = numpy.ndarray(shape, dtype=dt)
+ A = numpy.random.uniform(-10000000,
Modified: packages/pyzmq/trunk/debian/patches/series
===================================================================
--- packages/pyzmq/trunk/debian/patches/series 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/patches/series 2014-01-04 20:30:01 UTC (rev 27058)
@@ -1,4 +1,2 @@
-workaround-gevent.patch
noncopysend-test.patch
-clean-all.patch
cffi-fix.patch
Deleted: packages/pyzmq/trunk/debian/patches/workaround-gevent.patch
===================================================================
--- packages/pyzmq/trunk/debian/patches/workaround-gevent.patch 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/patches/workaround-gevent.patch 2014-01-04 20:30:01 UTC (rev 27058)
@@ -1,51 +0,0 @@
-Description: add explicit poll interval in zmq.green
- workaround same gevent FD bug in the sockets.
- These workarounds can be removed when gevent finally releases 1.0
-Origin: https://github.com/zeromq/pyzmq/pull/372
-Author: Min RK <benjaminrk at gmail.com>
-Bug: https://github.com/zeromq/pyzmq/issues/370
-
---- a/zmq/green/poll.py
-+++ b/zmq/green/poll.py
-@@ -11,6 +11,7 @@ class _Poller(_original_Poller):
- Ensures that the greened Poller below is used in calls to
- :meth:`zmq.core.Poller.poll`.
- """
-+ _gevent_bug_timeout = 1.33 # minimum poll interval, for working around gevent bug
-
- def _get_descriptors(self):
- """Returns three elements tuple with socket descriptors ready
-@@ -73,7 +74,16 @@ class _Poller(_original_Poller):
- return events
-
- # wait for activity on sockets in a green way
-- select.select(rlist, wlist, xlist)
-+ # set a minimum poll frequency,
-+ # because gevent < 1.0 cannot be trusted to catch edge-triggered FD events
-+ _bug_timeout = gevent.Timeout.start_new(self._gevent_bug_timeout)
-+ try:
-+ select.select(rlist, wlist, xlist)
-+ except gevent.Timeout as t:
-+ if t is not _bug_timeout:
-+ raise
-+ finally:
-+ _bug_timeout.cancel()
-
- except gevent.Timeout as t:
- if t is not tout:
---- a/zmq/tests/test_device.py
-+++ b/zmq/tests/test_device.py
-@@ -148,10 +148,10 @@ if have_gevent:
- g = gevent.spawn(zmq.green.device, zmq.QUEUE, rep, rep)
- req.connect('tcp://127.0.0.1:%i' % port)
- req.send(b'hi')
-- timeout = gevent.Timeout(1)
-+ timeout = gevent.Timeout(3)
- timeout.start()
- receiver = gevent.spawn(req.recv)
-- self.assertEqual(receiver.get(1), b'hi')
-+ self.assertEqual(receiver.get(2), b'hi')
- timeout.cancel()
-- g.kill()
-+ g.kill(block=True)
-
Modified: packages/pyzmq/trunk/debian/rules
===================================================================
--- packages/pyzmq/trunk/debian/rules 2014-01-04 19:20:59 UTC (rev 27057)
+++ packages/pyzmq/trunk/debian/rules 2014-01-04 20:30:01 UTC (rev 27058)
@@ -20,14 +20,14 @@
find debian/python3-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
find debian/python-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
# cffi is only used for pypy
- rm -rf debian/python-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
- rm -rf debian/python-dbg-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
- rm -rf debian/python3-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
- rm -rf debian/python3-dbg-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
+ rm -rf debian/python-zmq/usr/lib/python*/dist-packages/zmq/backend/cffi/
+ rm -rf debian/python-dbg-zmq/usr/lib/python*/dist-packages/zmq/backend/cffi/
+ rm -rf debian/python3-zmq/usr/lib/python*/dist-packages/zmq/backend/cffi/
+ rm -rf debian/python3-dbg-zmq/usr/lib/python*/dist-packages/zmq/backend/cffi/
# cython core is only used for cpython
- rm -rf debian/pypy-zmq/usr/lib/pypy/dist-packages/zmq/core/
+ rm -rf debian/pypy-zmq/usr/lib/pypy/dist-packages/zmq/backend/cython
# build shared libraries for pypy and install them
pypy -c 'import zmq'
- mv -v zmq/cffi_core/__pycache__/*.c zmq/cffi_core/__pycache__/*so \
- $(CURDIR)/debian/pypy-zmq/usr/lib/pypy/dist-packages/zmq/cffi_core/
+ mv -v zmq/backend/cffi/__pycache__/*.c zmq/backend/cffi/__pycache__/*so \
+ $(CURDIR)/debian/pypy-zmq/usr/lib/pypy/dist-packages/zmq/backend/cffi
More information about the Python-modules-commits
mailing list