File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11
11
import shutil
12
12
import warnings
13
13
import re
14
+ from distutils .version import LooseVersion
14
15
15
16
# may need to work around setuptools bug by providing a fake Pyrex
17
+ min_cython_ver = '0.19.1'
16
18
try :
17
19
import Cython
18
20
sys .path .insert (0 , os .path .join (os .path .dirname (__file__ ), "fake_pyrex" ))
21
+ ver = Cython .__version__
22
+ _CYTHON_INSTALLED = ver >= LooseVersion (min_cython_ver )
23
+ print 'cython version %s' % ver # NOTE: TA DEBUG
24
+ # _CYTHON_INSTALLED = True
25
+ # if not _CYTHON_INSTALLED:
26
+ # sys.exit('Install requires Cython >= %s' % min_cython_ver)
19
27
except ImportError :
20
- pass
28
+ _CYTHON_INSTALLED = False
21
29
22
30
# try bootstrapping setuptools if it doesn't exist
23
31
try :
74
82
from distutils .command .build_ext import build_ext as _build_ext
75
83
76
84
try :
85
+ if not _CYTHON_INSTALLED :
86
+ raise ImportError ('No supported version of Cython installed.' )
77
87
from Cython .Distutils import build_ext as _build_ext
78
88
# from Cython.Distutils import Extension # to get pyrex debugging symbols
79
89
cython = True
You can’t perform that action at this time.
0 commit comments