davemds pushed a commit to branch master.

commit 8219a6a52b140f3e055c7f4c4857612075138c60
Author: davemds <[email protected]>
Date:   Sun Apr 28 15:53:09 2013 +0200

    Python-EFL: Check the minimum cython version
---
 setup.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 208c079..80976b3 100755
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@ import sys
 import subprocess
 from distutils.core import setup, Command
 from distutils.extension import Extension
+from distutils.version import StrictVersion
 
 
 # Cython
@@ -12,10 +13,15 @@ try:
     from Cython.Build import cythonize
     import Cython.Compiler.Options
 
+    min_ver, cur_ver = "0.17.3", Cython.__version__
+    assert StrictVersion(cur_ver) >= StrictVersion(min_ver)
+    print("Found Cython: %s" % cur_ver)
+
     Cython.Compiler.Options.fast_fail = True # stop compilation on first error
     Cython.Compiler.Options.annotate = False # HTML file annotation generation
-except ImportError:
-    raise SystemExit("Requires Cython (http://cython.org/)")
+
+except (ImportError, AssertionError):
+    raise SystemExit("Requires Cython >= %s (http://cython.org/)" % min_ver)
 
 
 # Sphinx

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

Reply via email to