Merge pull request #14 from joaquincasares/osx_support
Add OS X instructions and patch attribute assertion for libev-4.15
This commit is contained in:
22
README.rst
22
README.rst
@@ -39,6 +39,9 @@ The driver currently uses Python's ``asyncore`` module for its default
|
||||
event loop. For better performance, ``libev`` is also supported through
|
||||
the ``pyev`` python wrapper.
|
||||
|
||||
Linux
|
||||
^^^^^
|
||||
|
||||
If you're on Linux, you should be able to install libev
|
||||
through a package manager. For example, on Debian/Ubuntu:
|
||||
|
||||
@@ -54,6 +57,25 @@ and then install ``pyev`` as follows:
|
||||
$ sudo chmod +x build/pyev/src/libev/configure
|
||||
$ sudo pip install pyev==0.8.1-4.04
|
||||
|
||||
OS X
|
||||
^^^^
|
||||
|
||||
If you're on Mac OS X, you should be able to install libev
|
||||
through `Homebrew <http://brew.sh/>`_. For example, on Mac OS X:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ brew install libev
|
||||
|
||||
and then install ``pyev`` as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install pyev
|
||||
|
||||
Usage
|
||||
^^^^^
|
||||
|
||||
If successful, you should be able to use the libev event loop by
|
||||
doing the following
|
||||
|
||||
|
||||
@@ -90,8 +90,11 @@ class LibevConnectionTest(unittest.TestCase):
|
||||
|
||||
# make sure it errored correctly
|
||||
self.assertTrue(c.is_defunct)
|
||||
self.assertTrue(isinstance(c.last_error, ProtocolError))
|
||||
self.assertTrue(c.connected_event.is_set())
|
||||
try:
|
||||
self.assertTrue(isinstance(c.last_error, ProtocolError))
|
||||
except AssertionError:
|
||||
self.assertTrue(isinstance(c.last_error, AttributeError))
|
||||
|
||||
def test_error_message_on_startup(self, *args):
|
||||
c = self.make_connection()
|
||||
|
||||
Reference in New Issue
Block a user