Merge pull request #1986 from stefanv/cython_version_check

Warn if user tries to build with older Cython version
This commit is contained in:
Emmanuelle Gouillart
2016-03-07 13:14:25 +01:00
+5 -1
View File
@@ -1,7 +1,7 @@
import sys
import os
import hashlib
import subprocess
from distutils.version import LooseVersion
# WindowsError is not defined on unix systems
try:
@@ -25,6 +25,10 @@ def cython(pyx_files, working_path=''):
return
try:
from Cython import __version__
if LooseVersion(__version__) < '0.23':
raise RuntimeError('Cython >= 0.23 needed to build scikit-image')
from Cython.Build import cythonize
except ImportError:
# If cython is not found, we do nothing -- the build will make use of