Warn if user tries to build with older Cython version

This commit is contained in:
Stefan van der Walt
2016-03-07 01:38:22 -08:00
parent 50fa219975
commit e1c2ea29dd
+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