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:
1
setup.py
1
setup.py
@@ -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).")
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user