analyse: add an env var to force using logilab constraint for resolution stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 22 Mar 2012 10:13:32 +0100
branchstable
changeset 690 43fc51a17f49
parent 689 5705594b7f86
child 691 4c8790030e0c
analyse: add an env var to force using logilab constraint for resolution This is very useful for test
analyze.py
--- a/analyze.py	Fri Mar 16 15:23:41 2012 +0100
+++ b/analyze.py	Thu Mar 22 10:13:32 2012 +0100
@@ -22,6 +22,7 @@
 
 from cStringIO import StringIO
 
+import os, sys
 from rql import TypeResolverException, nodes
 from pprint import pprint
 
@@ -29,6 +30,9 @@
 from itertools import izip
 
 try:
+    pure = bool(os.environ.get('RQL_USE_PURE_PYTHON_ANALYSE', 0))
+    if pure:
+        raise ImportError
     import rql_solve
 except ImportError:
     rql_solve = None