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 /setup.py | |
parent | d516af64dbef41ed0668fd5e0ae70de3cf787e13 (diff) |
catch ImportError in setup.py
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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.") |