pyximport for test helper cython extensions

Allows cython extension to be built for unit tests without having it in
the setup.
This commit is contained in:
Adam Holmberg
2015-08-13 19:00:38 -05:00
parent e25035318e
commit 133e597d7e
3 changed files with 5 additions and 1 deletions

View File

@@ -273,7 +273,6 @@ if "--no-cython" not in sys.argv and not os.environ.get('CASS_DRIVER_NO_CYTHON')
for m in cython_candidates],
exclude_failures=True))
extensions.extend(cythonize("cassandra/*.pyx"))
extensions.extend(cythonize("tests/unit/cython/*.pyx"))
except Exception:
sys.stderr.write("Cython is not installed. Not compiling core driver files as extensions (optional).")

View File

@@ -14,6 +14,10 @@
from cassandra.cython_deps import HAVE_CYTHON, HAVE_NUMPY
if HAVE_CYTHON:
import pyximport
pyximport.install()
try:
import unittest2 as unittest
except ImportError:

View File

@@ -11,6 +11,7 @@ deps = nose
deps = {[base]deps}
sure
blist
cython
py26: unittest2
py{26,27}: gevent
twisted