Mercurial > repos > peterjc > mira4_assembler
comparison tools/mira4/mira4_bait.py @ 13:7fcabeeca5df draft
Uploaded v0.0.2 preview 5, fixes for MIRA 4.0 (final), more verbose error if $MIRA4 path wrong
author | peterjc |
---|---|
date | Sun, 16 Feb 2014 16:30:48 -0500 |
parents | a6a56440567c |
children |
comparison
equal
deleted
inserted
replaced
12:a6a56440567c | 13:7fcabeeca5df |
---|---|
41 mira_path = os.environ["MIRA4"] | 41 mira_path = os.environ["MIRA4"] |
42 except KeyError: | 42 except KeyError: |
43 stop_err("Environment variable $MIRA4 not set") | 43 stop_err("Environment variable $MIRA4 not set") |
44 mira_binary = os.path.join(mira_path, "mirabait") | 44 mira_binary = os.path.join(mira_path, "mirabait") |
45 if not os.path.isfile(mira_binary): | 45 if not os.path.isfile(mira_binary): |
46 stop_err("Missing mirabait under $MIRA4, %r" % mira_binary) | 46 stop_err("Missing mirabait under $MIRA4, %r\nFolder contained: %s" |
47 % (mira_binary, ", ".join(os.listdir(mira_path)))) | |
47 mira_ver = get_version(mira_binary) | 48 mira_ver = get_version(mira_binary) |
48 if not mira_ver.strip().startswith("4.0"): | 49 if not mira_ver.strip().startswith("4.0"): |
49 stop_err("This wrapper is for MIRA V4.0, not:\n%s" % mira_ver) | 50 stop_err("This wrapper is for MIRA V4.0, not:\n%s" % mira_ver) |
50 if "-v" in sys.argv or "--version" in sys.argv: | 51 if "-v" in sys.argv or "--version" in sys.argv: |
51 print "%s, MIRA wrapper version %s" % (mira_ver, WRAPPER_VER) | 52 print "%s, MIRA wrapper version %s" % (mira_ver, WRAPPER_VER) |