summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Mulansky <mario.mulansky@gmx.net>2014-10-16 15:26:58 +0200
committerMario Mulansky <mario.mulansky@gmx.net>2014-10-16 15:26:58 +0200
commit7ff5a4afe2d7a40dce34ae187a23b7d0feba33ba (patch)
tree7723d961c1336e24bdd3d01fe569c8d21f14b2d3
parentd516af64dbef41ed0668fd5e0ae70de3cf787e13 (diff)
catch ImportError in setup.py
-rw-r--r--.travis.yml1
-rw-r--r--setup.py17
2 files changed, 12 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 2bbb9ca..1035775 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,4 +11,3 @@ install:
script:
- python setup.py build_ext --inplace
- nosetests
-
diff --git a/setup.py b/setup.py
index a9f40bd..fc8d0d2 100644
--- a/setup.py
+++ b/setup.py
@@ -2,16 +2,23 @@
Handles the compilation of pyx source files
+run as:
+python setup.py build_ext --inplace
+
Copyright 2014, Mario Mulansky <mario.mulansky@gmx.net>
Distributed under the BSD License
"""
from distutils.core import setup
-from Cython.Build import cythonize
import numpy
-setup(
- ext_modules=cythonize("pyspike/*.pyx"),
- include_dirs=[numpy.get_include()]
-)
+try:
+ from Cython.Build import cythonize
+ setup(
+ ext_modules=cythonize("pyspike/*.pyx"),
+ include_dirs=[numpy.get_include()]
+ )
+except ImportError:
+ print("Error: Cython is not installed! You will only be able to use the \
+much slower Python backend in PySpike.")