X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/blobdiff_plain/9e99acfd96c74ff373639b6805b95027664feaac..5a0fb86db83104982d1cd23099c2b59eea3d893a:/bin/dependencies_b.py diff --git a/bin/dependencies_b.py b/bin/dependencies_b.py index 94663ce..b3b82b0 100644 --- a/bin/dependencies_b.py +++ b/bin/dependencies_b.py @@ -46,7 +46,7 @@ def check_java(): warn(specific, "java is not required, but allows qwebirc to compress output,", "making it faster to download.", "you can get java at http://www.java.com/") try: - p = subprocess.Popen(["java", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(["java", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=os.name == "nt") p.communicate() if p.wait() != 0: java_warn("something went wrong looking for java.") @@ -62,7 +62,7 @@ def check_hg(): warn(specific, "mercurial (hg) is not required, but allows qwebirc to save bandwidth by versioning.", "you can get hg at http://www.selenic.com/mercurial/") try: - p = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=os.name == "nt") p.communicate() if p.wait() != 0: hg_warn("something went wrong looking for mercurial.") @@ -126,10 +126,15 @@ def check_json(): def check_autobahn(): try: - import autobahn.websocket + import autobahn, autobahn.websocket + x = autobahn.version.split(".") + if len(x) != 3: + raise ImportError("Unknown version: %s", autobahn.vesrion) + if (int(x[1]) < 8) or (int(x[1]) == 8 and int(x[2]) < 14): + raise ImportError() return 0 except ImportError: - warn("autobahn not installed; websocket support will be disabled.", + warn("autobahn 0.8.14 (minimum) not installed; websocket support will be disabled.", "consider installing autobahn from:", "http://autobahn.ws/python/getstarted/") return 1