diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-16 15:26:58 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-16 15:26:58 +0200 |
commit | 7ff5a4afe2d7a40dce34ae187a23b7d0feba33ba (patch) | |
tree | 7723d961c1336e24bdd3d01fe569c8d21f14b2d3 | |
parent | d516af64dbef41ed0668fd5e0ae70de3cf787e13 (diff) |
catch ImportError in setup.py
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | setup.py | 17 |
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 - @@ -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.") |