diff --git a/setup.py b/setup.py index 9dfd32d8..46b512ee 100644 --- a/setup.py +++ b/setup.py @@ -120,11 +120,12 @@ def finalize_options(self): if need_cythonize: try: import Cython + from distutils.version import LooseVersion except ImportError: raise RuntimeError( 'please install Cython to compile uvloop from source') - if Cython.__version__ < '0.28': + if LooseVersion(Cython.__version__) < LooseVersion('0.28'): raise RuntimeError( 'uvloop requires Cython version 0.28 or greater')