]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Merge.
authorChris Porter <redacted>
Mon, 18 Aug 2014 19:45:30 +0000 (20:45 +0100)
committerChris Porter <redacted>
Mon, 18 Aug 2014 19:45:30 +0000 (20:45 +0100)
1  2 
bin/dependencies_b.py

diff --combined bin/dependencies_b.py
index b3b82b0b11b8521f884b8497837089614f3ccaaa,697aac96f4f81bd4ddd69637f000330d9a27b1f0..e02e875cba1f7417ab35450ad2662605572ed0f2
@@@ -1,8 -1,9 +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
@@@ -17,11 -18,10 +18,11 @@@ def check_dependencies()
    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
@@@ -84,7 -84,7 +85,7 @@@ def check_zope()
        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
 +\r
  def check_twisted():\r
    try:\r
      import twisted\r
@@@ -123,22 -123,7 +124,22 @@@ 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, 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
 +\r
  if __name__ == "__main__":\r
    import dependencies\r
    dependencies.check_dependencies()\r