doc: add cython extensions to installation page
This commit is contained in:
@@ -4,8 +4,7 @@ Installation
|
|||||||
Supported Platforms
|
Supported Platforms
|
||||||
-------------------
|
-------------------
|
||||||
Python 2.6, 2.7, 3.3, and 3.4 are supported. Both CPython (the standard Python
|
Python 2.6, 2.7, 3.3, and 3.4 are supported. Both CPython (the standard Python
|
||||||
implementation) and `PyPy <http://pypy.org>`_ are supported and tested
|
implementation) and `PyPy <http://pypy.org>`_ are supported and tested.
|
||||||
against.
|
|
||||||
|
|
||||||
Linux, OSX, and Windows are supported.
|
Linux, OSX, and Windows are supported.
|
||||||
|
|
||||||
@@ -65,7 +64,7 @@ To check if the installation was successful, you can run::
|
|||||||
|
|
||||||
python -c 'import cassandra; print cassandra.__version__'
|
python -c 'import cassandra; print cassandra.__version__'
|
||||||
|
|
||||||
It should print something like "2.0.0".
|
It should print something like "2.7.0".
|
||||||
|
|
||||||
(*Optional*) Compression Support
|
(*Optional*) Compression Support
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@@ -94,30 +93,33 @@ support this::
|
|||||||
|
|
||||||
pip install scales
|
pip install scales
|
||||||
|
|
||||||
(*Optional*) Sorted Sets
|
(*Optional*) blist for Sorted Sets
|
||||||
------------------------
|
----------------------------------
|
||||||
Cassandra can store entire collections within a column. One of those
|
Cassandra can store entire collections within a column. One of those
|
||||||
collection types is a set. Cassandra's sets are actually ordered
|
collection types is a set. Cassandra's sets are actually ordered
|
||||||
sets. By default, the driver will use unordered sets to represent
|
sets. By default, the driver will use a pure Python ordered sets to represent
|
||||||
these collections. If you would like to maintain the ordering,
|
these collections. If you would like to use an optimized implementation,
|
||||||
install the ``blist`` library::
|
install the ``blist`` library::
|
||||||
|
|
||||||
pip install blist
|
pip install blist
|
||||||
|
|
||||||
|
* Note: blist performance is not necessarily better for simply querying sets.
|
||||||
|
The only benefit may come with doing set logic in results processing.
|
||||||
|
|
||||||
(*Optional*) Non-python Dependencies
|
(*Optional*) Non-python Dependencies
|
||||||
------------------------------------
|
------------------------------------
|
||||||
The driver has several **optional** features that have non-Python dependencies.
|
The driver has several **optional** features that have non-Python dependencies.
|
||||||
|
|
||||||
C Extensions
|
C Extensions
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
By default, two C extensions are compiled: one that adds support
|
By default, a number of extensions are complect, providing faster hashing
|
||||||
for token-aware routing with the ``Murmur3Partitioner``, and one that
|
for token-aware routing with the ``Murmur3Partitioner``,
|
||||||
allows you to use `libev <http://software.schmorp.de/pkg/libev.html>`_
|
`libev <http://software.schmorp.de/pkg/libev.html>`_ event loop integration,
|
||||||
for the event loop, which improves performance.
|
and Cython optimized extensions.
|
||||||
|
|
||||||
When installing manually through setup.py, you can disable both with
|
When installing manually through setup.py, you can disable both with
|
||||||
the ``--no-extensions`` option, or selectively disable one or the other
|
the ``--no-extensions`` option, or selectively disable them with
|
||||||
with ``--no-murmur3`` and ``--no-libev``.
|
with ``--no-murmur3``, ``--no-libev``, or ``--no-cython``.
|
||||||
|
|
||||||
To compile the extensions, ensure that GCC and the Python headers are available.
|
To compile the extensions, ensure that GCC and the Python headers are available.
|
||||||
|
|
||||||
@@ -133,6 +135,23 @@ On OS X, homebrew installations of Python should provide the necessary headers.
|
|||||||
|
|
||||||
See :ref:`windows_build` for notes on configuring the build environment on Windows.
|
See :ref:`windows_build` for notes on configuring the build environment on Windows.
|
||||||
|
|
||||||
|
Cython-based Extensions
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
By default, this package uses `Cython <http://cython.org/>`_ to optimize core modules and build custom extensions.
|
||||||
|
This is not a hard requirement, but is engaged by default to build extensions offering better performance than the
|
||||||
|
pure Python implementation.
|
||||||
|
|
||||||
|
This build phase can be avoided using the build switch, or an environment variable::
|
||||||
|
|
||||||
|
python setup.py install --no-cython
|
||||||
|
-or-
|
||||||
|
pip install --install-option="--no-cython" <spec-or-path>
|
||||||
|
|
||||||
|
Alternatively, an environment variable can be used to switch this option regardless of
|
||||||
|
context::
|
||||||
|
|
||||||
|
CASS_DRIVER_NO_CYTHON=1 <your script here>
|
||||||
|
|
||||||
libev support
|
libev support
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
The driver currently uses Python's ``asyncore`` module for its default
|
The driver currently uses Python's ``asyncore`` module for its default
|
||||||
|
|||||||
Reference in New Issue
Block a user