+ \r
+def check_json():\r
+ import qwebirc.util.qjson\r
+ if qwebirc.util.qjson.slow:\r
+ warn("simplejson module with C speedups not installed.",\r
+ "using embedded module (slower); consider installing simplejson from:",\r
+ "http://pypi.python.org/pypi/simplejson/")\r
+ return 1\r
+ return 0\r
+\r
+def check_autobahn():\r
+ try:\r
+ import autobahn, autobahn.websocket\r
+ x = autobahn.version.split(".")\r
+ if len(x) != 3:\r
+ raise ImportError("Unknown version: %s", autobahn.vesrion)\r
+ if (int(x[1]) < 8) or (int(x[1]) == 8 and int(x[2]) < 14):\r
+ raise ImportError()\r
+ return 0\r
+ except ImportError:\r
+ warn("autobahn 0.8.14 (minimum) not installed; websocket support will be disabled.",\r
+ "consider installing autobahn from:",\r
+ "http://autobahn.ws/python/getstarted/")\r
+ return 1\r