Skip to content

Commit

Permalink
Handle no Cython error in setup.py (#931)
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Panev <[email protected]>
  • Loading branch information
Kh4L authored and zhreshold committed Sep 6, 2019
1 parent 384f30e commit dc1af56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
import sys

import numpy as np
from Cython.Build import cythonize
try:
from Cython.Build import cythonize
except ImportError:
cythonize = None
from setuptools import setup, find_packages, Extension

with_cython = False
if '--with-cython' in sys.argv:
if not cythonize:
print("Cython not found, please run `pip install Cython`")
exit(1)
with_cython = True
sys.argv.remove('--with-cython')

Expand Down

0 comments on commit dc1af56

Please sign in to comment.