]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - bin/dependencies_b.py
Split up about.html lines.
[irc/quakenet/qwebirc.git] / bin / dependencies_b.py
index e5ecda5f4c9837398e9cfe757bfcde7b42b4f9f0..94663cee05b435e23cc94b26b3298a8084a3fd0c 100644 (file)
@@ -15,11 +15,13 @@ def check_dependencies():
   i = 0\r
   \r
   check_twisted()\r
+  check_zope()\r
   check_win32()\r
+  i+=check_autobahn()\r
   i+=check_json()\r
   i+=check_java()\r
   i+=check_hg()\r
-  \r
+\r
   print "0 errors, %d warnings." % i\r
   \r
   if i == 0:\r
@@ -71,6 +73,18 @@ def check_hg():
     \r
   return 0\r
   \r
+def check_zope():\r
+  try:\r
+    from zope.interface import Interface\r
+  except ImportError:\r
+    if sys.platform.startswith("win"):\r
+      fail("qwebirc requires zope interface",\r
+           "see pypi: http://pypi.python.org/pypi/zope.interface")\r
+    else:\r
+      fail("qwebirc requires zope interface.",\r
+           "this should normally come with twisted, but can be downloaded",\r
+           "from pypi: http://pypi.python.org/pypi/zope.interface")\r
+\r
 def check_twisted():\r
   try:\r
     import twisted\r
@@ -109,7 +123,17 @@ def check_json():
          "http://pypi.python.org/pypi/simplejson/")\r
     return 1\r
   return 0\r
-  \r
+\r
+def check_autobahn():\r
+  try:\r
+    import autobahn.websocket\r
+    return 0\r
+  except ImportError:\r
+    warn("autobahn not installed; websocket support will be disabled.",\r
+         "consider installing autobahn from:",\r
+         "http://autobahn.ws/python/getstarted/")\r
+    return 1\r
+\r
 if __name__ == "__main__":\r
   import dependencies\r
   dependencies.check_dependencies()\r