1
1
==============================
2
PyZMQ: Python bindings for 0MQ
2
PyZMQ: Python bindings for ØMQ
3
3
==============================
5
This package contains Python bindings for `0QM <http://www.zeromq.org>`_.
6
0MQ is a lightweight and fast messaging implementation.
5
This package contains Python bindings for `ØMQ <http://www.zeromq.org>`_.
6
ØMQ is a lightweight and fast messaging implementation.
8
PyZMQ should work with libzmq ≥ 2.1.4 (including libzmq 3.2.x), and Python ≥ 2.6 (including Python 3).
13
Current release of pyzmq is 2.2.0, and targets libzmq-2.2.0. For libzmq
14
2.0.x, use pyzmq release 2.0.10.1 or the 2.0.x development branch.
16
pyzmq-2.1.11 was the last version of pyzmq to support Python 2.5, and pyzmq 2.2.0 will
19
PyZMQ versioning follows libzmq versioning. In general, your pyzmq version should be the same
20
as that of your libzmq, but due to the generally growing API of libzmq, your pyzmq should
21
*not* be newer than your libzmq. This is a strict restriction for pyzmq <= 2.1.0, but we
22
intend to support libzmq >= 2.1.4 (the first 'stable' 2.1 release) for pyzmq 2.1.x.
24
For a summary of changes to pyzmq, see our `changelog <http://zeromq.github.com/pyzmq/changelog.html>`_.
29
As of 2.1.7, we have experimental support for the 3.x API of libzmq,
30
developed at https://github.com/zeromq/libzmq. No code to change, no flags to pass, just
31
build pyzmq against libzmq3 and it should work.
36
See PyZMQ's Sphinx-generated `documentation <http://zeromq.github.com/pyzmq>`_ on GitHub for API
37
details, and some notes on Python and Cython development. If you want to learn about
38
using ØMQ in general, the excellect `ØMQ Guide <http://zguide.zeromq.org>`_ is the place
39
to start, which has a Python version of every example.
11
44
Unless you specifically want to develop PyZMQ, we recommend downloading the
12
PyZMQ source code from our github download page here:
14
https://github.com/zeromq/pyzmq/downloads
16
While you can also get the latest source code by forking our github
17
repository, building from the repository will require that you download and
18
install Cython version 0.13 or later.
45
PyZMQ source code or MSI installer from our `GitHub download page <https://github.com/zeromq/pyzmq/downloads>`_,
46
or an egg from `PyPI <http://pypi.python.org/pypi/pyzmq>`_.
48
You can also get the latest source code from our GitHub repository, but
49
building from the repository will require that you install Cython version 0.13
20
53
Building and installation
21
54
=========================
59
We build eggs for OS X and Windows, so we recommend that those platforms use ``easy_install pyzmq``.
60
But many users prefer pip, which unfortunately still ignores eggs.
61
In an effort to make pyzmq easier to install,
62
pyzmq will try to build libzmq as a Python extension if it cannot find a libzmq to link against.
64
This is thanks to work done in `pyzmq_static <https://github.com/brandon-rhodes/pyzmq-static>`_.
66
Linking against system libzmq is still the preferred mechanism,
67
so pyzmq will try pretty hard to find it.
68
You can skip the searching by explicitly specifying that pyzmq build its own libzmq::
70
$> pip install pyzmq --install-option="--zmq=bundled"
76
We have binary installers for various Pythons on OSX and Windows, so you should be able to
77
just ``easy_install pyzmq`` in many situations. These eggs *include matching libzmq*, so they should
78
be the only thing you need to start using pyzmq, but we simply don't have the experience to know
79
when and where these installers will not work.
81
If a binary installer fails for you, please `tell us <https://github.com/zeromq/pyzmq/issues>`_
82
about your system and the failure, so that we can try to fix it in later releases, and fall back
83
on building from source.
85
Eggs are on `PyPI <http://pypi.python.org/pypi/pyzmq>`_, and we have them for 'current' Pythons,
86
which are for OSX 10.7:
88
* Python 2.7, 3.2 (32b+64b intel)
92
* Python 2.6 (32b+64b intel)
94
and Windows (x86 and x64):
98
We also have MSI installer packages in our `downloads
99
<http://github.com/zeromq/pyzmq/downloads>`_ section on GitHub.
101
A Python 2.6/win64 MSI for 2.1.7 was provided by Craig Austin (craig DOT austin AT gmail DOT com)
103
Our build scripts are much improved as of 2.1.4, so if you would like to contribute better
104
Windows installers, or have any improvements on existing releases, they would be much
105
appreciated. Simply ``python setup.py bdist_msi`` or ``python setupegg.py bdist_egg`` *should*
106
work, once you have libzmq and Python. We simply don't have the VMs or time in which to cover
107
all the bases ourselves.
110
Sometimes libzmq.so/dll/dylib doesn't get included unless ``build`` is
111
specified *also*, e.g. ``python setupegg.py build bdist_egg``, but this
112
doesn't always seem to be true.
26
To build and install this Python package, you will first need to build and
27
install the latest development version of 0MQ itself. After you have done
28
this, follow these steps:
30
First, copy the ``setup.cfg.template`` file in this directory to ``setup.cfg``
31
and edit the `include_dirs` and `library_dirs` fields of the ``setup.cfg``
32
file to point to the directories that contain the library and header file for
33
your 0MQ installation.
117
To build and install pyzmq from source, you will first need to build libzmq.
118
After you have done this, follow these steps:
120
Tell pyzmq where libzmq is via the configure subcommand:
122
$ python setup.py configure --zmq=/path/to/zeromq
124
or the zmq install directory on OSX/Linux:
126
$ python setup.py configure --zmq=/usr/local
128
The argument should be a directory containing ``lib`` and ``include`` directories, with
129
``libzmq`` and ``zmq.h`` respectively. For instance (on Windows), if you have downloaded pyzmq
130
and current libzmq into the same parent directory, this would be:
132
$ python setup.py configure --zmq=../zeromq-2.2.0
35
134
Second, run this command::
46
Generally you'll need to add the location of ``libzmq.dll`` to your ``$PATH``.
47
Here's Microsoft's docs:
48
http://msdn.microsoft.com/en-us/library/7d83bc18(VS.80).aspx on this topic.
50
It is best to compile both ØMQ and PyØMQ with Microsoft Visual Studio 2008 or
51
above. You should not need to use mingw.
145
On Windows, libzmq.dll will be copied into the zmq directory, and installed along with pyzmq,
146
so you shouldn't need to edit your ``PATH``.
148
It is best to compile both ØMQ and PyØMQ with Microsoft Visual Studio 2008. You
149
should not need to use mingw. If you build libzmq with MSVS 2010, then there
150
will be issues in error handling, because there will be a mismatch between error
153
Current testing indicates that running
155
$ python setup.py bdist_msi
157
successfully builds a working MSI installer, but we don't have enough Windows deployment
158
experience to know where that may fail.
163
64b Windows builds have been successful (as of 2.1.7.1), using VC++ 2008 express, and the
164
Windows 7 SDK. VS2008 had to be patched as described `here
165
<http://www.cppblog.com/xcpp/archive/2009/09/09/vc2008express_64bit_win7sdk.html>`_, and
166
pyzmq was built following `these instructions <http://wiki.cython.org/64BitCythonExtensionsOnWindows>`_ on the Cython wiki.
56
On Linux, you will need to do one of the following:
171
If you install libzmq to a location other than the default (``/usr/local``) on Linux,
172
you may need to do one of the following:
58
* Set ``LD_LIBRARY_PATH`` to point to the ``lib`` directory of 0MQ.
59
* Build the extension using the ``-rpath`` flag::
174
* Set ``LD_LIBRARY_PATH`` to point to the ``lib`` directory of ØMQ.
175
* Build the extension using the ``--rpath`` flag::
61
177
$ python setup.py build_ext --rpath=/opt/zeromq-dev/lib --inplace
182
The easiest way to install libzmq on OSX is with the wonderful `homebrew <http://mxcl.github.com/homebrew/>`_
183
package manager, via::
185
$ brew install zeromq
187
And to build a 32+64b intel fat binary, add ``--universal``::
189
$ brew install zeromq --universal
191
This will install libzmq in /usr/local, making pyzmq installable with pip, which doesn't
192
support our binary eggs.
122
This project was started by and continues to be led by Brian E. Granger
123
(ellisonbg AT gmail DOT com).
255
This project was started and continues to be led by Brian E. Granger
256
(ellisonbg AT gmail DOT com). Min Ragan-Kelley (benjaminrk AT gmail DOT com)
257
is the primary developer of pyzmq at this time.
125
259
The following people have contributed to the project:
127
* Carlos Rocha (carlos DOT rocha AT gmail DOT com)
262
* Andrea Crotti (andrea DOT crotti DOT 0 AT gmail DOT com)
128
263
* Andrew Gwozdziewycz (git AT apgwoz DOT com)
129
* Fernando Perez (fernando DOT perez AT berkeley DOT edu)
130
* Nicholas Piel (nicholas AT nichol DOT as)
131
* Eugene Chernyshov (chernyshov DOT eugene AT gmail DOT com)
264
* Baptiste Lepilleur (baptiste DOT lepilleur AT gmail DOT com)
265
* Brandyn A. White (bwhite AT dappervision DOT com)
266
* Brian E. Granger (ellisonbg AT gmail DOT com)
267
* Carlos A. Rocha (carlos DOT rocha AT gmail DOT com)
268
* Daniel Lundin (dln AT spotify DOT com)
269
* Daniel Truemper (truemped AT googlemail DOT com)
270
* Erick Tryzelaar (erick DOT tryzelaar AT gmail DOT com)
271
* Erik Tollerud (erik DOT tollerud AT gmail DOT com)
272
* Fernando Perez (Fernando DOT Perez AT berkeley DOT edu)
273
* Frank Wiles (frank AT revsys DOT com)
274
* Gavrie Philipson (gavriep AT il DOT ibm DOT com)
275
* Godefroid Chapelle (gotcha AT bubblenet DOT be)
276
* Ivo Danihelka (ivo AT danihelka DOT net)
277
* John Gallagher (johnkgallagher AT gmail DOT com)
132
278
* Justin Riley (justin DOT t DOT riley AT gmail DOT com)
133
* Ivo Danihelka (ivo AT denihelka DOT net)
134
* Thomas Supra (tomspur AT fedoraproject DOT org)
135
* Douglas Creager (dcreager AT dcreager DOT net)
136
* Erick Tryzelaar (erick DOT tryzelaar AT gmail DOT com)
279
* Marc Abramowitz (marc AT marc-abramowitz DOT com)
280
* Michel Pelletier (pelletier DOT michel AT gmail DOT com)
137
281
* Min Ragan-Kelley (benjaminrk AT gmail DOT com)
282
* Nicholas Piël (nicholas AT nichol DOT as)
283
* Nick Pellegrino (npellegrino AT mozilla DOT com)
284
* Ondrej Certik (ondrej AT certik DOT cz)
285
* Paul Colomiets (paul AT colomiets DOT name)
138
286
* Scott Sadler (github AT mashi DOT org)
287
* Stefan Friesel (sf AT cloudcontrol DOT de)
288
* Stefan van der Walt (stefan AT sun DOT ac DOT za)
289
* Thomas Kluyver (takowl AT gmail DOT com)
290
* Thomas Spura (tomspur AT fedoraproject DOT org)
291
* Tigger Bear (Tigger AT Tiggers-Mac-mini DOT local)
292
* Zbigniew Jędrzejewski-Szmek (zbyszek AT in DOT waw DOT pl)
293
* hugo shi (hugoshi AT bleb2 DOT (none))
139
294
* spez (steve AT hipmunk DOT com)
140
* Thomas Kluyver (takowl AT gmail DOT com)
298
git log --all --format='* %aN (%aE)' | sort -u | sed 's/@/ AT /1' | sed -e 's/\./ DOT /g'
300
with some adjustments.
305
* Brandon Craig-Rhodes (brandon AT rhodesmill DOT org)
306
* Eugene Chernyshov (chernyshov DOT eugene AT gmail DOT com)
307
* Douglas Creager (dcreager AT dcreager DOT net)
308
* Craig Austin (craig DOT austin AT gmail DOT com)
311
gevent_zeromq, now zmq.green
312
----------------------------
314
* Travis Cline (travis DOT cline AT gmail DOT com)
315
* Ryan Kelly (ryan AT rfk DOT id DOT au)
316
* Zachary Voase (z AT zacharyvoase DOT com)