]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - bin/dependencies_b.py
Merge.
[irc/quakenet/qwebirc.git] / bin / dependencies_b.py
index 4a3ab007dd4641300f69a632545d5425966aa062..746860ae91ac9a40ba9ba65fab72c50fba3501ed 100644 (file)
@@ -1,8 +1,9 @@
-# this is seperate to allow us to use python 2.5 syntax without\r
+# this is separate to allow us to use python 2.5 syntax without\r
 # the dependency checker breaking on earlier versions.\r
 \r
 import sys\r
 import subprocess\r
+import os\r
 \r
 def fail(*message):\r
   print >>sys.stderr, "\n".join(message)\r
@@ -13,9 +14,9 @@ def warn(*message):
 \r
 def check_dependencies():\r
   i = 0\r
-  \r
-  check_twisted()\r
+\r
   check_zope()\r
+  check_twisted()\r
   check_win32()\r
   i+=check_autobahn()\r
   i+=check_json()\r
@@ -126,10 +127,15 @@ def check_json():
 \r
 def check_autobahn():\r
   try:\r
-    import autobahn.websocket\r
+    import autobahn, autobahn.twisted.websocket\r
+    x = autobahn.version.split(".")\r
+    if len(x) != 3:\r
+      raise ImportError()\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 not installed; websocket support will be disabled.",\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