Skip to content

Commit 4cbf170

Browse files
committed
doc: more detail about ways to skip cython
1 parent 8618bf9 commit 4cbf170

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

cassandra/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3307,7 +3307,7 @@ def has_more_pages(self):
33073307
@property
33083308
def current_rows(self):
33093309
"""
3310-
:return: the list of current page rows. May be empty if the result was empty,
3310+
The list of current page rows. May be empty if the result was empty,
33113311
or this is the last page.
33123312
"""
33133313
return self._current_rows or []

docs/installation.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,33 @@ By default, this package uses `Cython <http://cython.org/>`_ to optimize core mo
129129
This is not a hard requirement, but is engaged by default to build extensions offering better performance than the
130130
pure Python implementation.
131131

132+
This is a costly build phase, especially in clean environments where the Cython compiler must be built
132133
This build phase can be avoided using the build switch, or an environment variable::
133134

134135
python setup.py install --no-cython
135-
-or-
136-
pip install --install-option="--no-cython" <spec-or-path>
137136

138137
Alternatively, an environment variable can be used to switch this option regardless of
139138
context::
140139

141140
CASS_DRIVER_NO_CYTHON=1 <your script here>
141+
- or, to disable all extensions:
142+
CASS_DRIVER_NO_EXTENSIONS=1 <your script here>
143+
144+
This method is required when using pip, which provides no other way of injecting user options in a single command::
145+
146+
CASS_DRIVER_NO_CYTHON=1 pip install cassandra-driver
147+
CASS_DRIVER_NO_CYTHON=1 sudo -E pip install ~/python-driver
148+
149+
The environment variable is the preferred option because it spans all invocations of setup.py, and will
150+
prevent Cython from being materialized as a setup requirement.
151+
152+
If your sudo configuration does not allow SETENV, you must push the option flag down via pip. However, pip
153+
applies these options to all dependencies (which break on the custom flag). Therefore, you must first install
154+
dependencies, then use install-option::
155+
156+
sudo pip install six futures
157+
sudo pip install --install-option="--no-cython"
158+
142159

143160
libev support
144161
^^^^^^^^^^^^^

0 commit comments

Comments
 (0)