def main(argv): """Install or upgrade merlin""" try: import merlin except ImportError: egg = None try: egg = download_merlin(delay=0) sys.path.insert(0,egg) from merlin import main return main(['install'] + list(argv) + [egg]) # we're done here finally: if egg and os.path.exists(egg): os.unlink(egg) import merlin try: merlin.require(reqSpec) except merlin.VersionConflict: from merlin import main main(list(argv)+[download_merlin(delay=0)]) sys.exit(0) # try to force an exit else: if argv: from merlin import main main(['install'] + argv) else: print "Merlin version",branch,"has been installed."
def main(argv): """Install or upgrade merlin""" try: import merlin except ImportError: egg = None try: egg = download_merlin(delay=0) sys.path.insert(0, egg) from merlin import main return main(['install'] + list(argv) + [egg]) # we're done here finally: if egg and os.path.exists(egg): os.unlink(egg) import merlin try: merlin.require(reqSpec) except merlin.VersionConflict: from merlin import main main(list(argv) + [download_merlin(delay=0)]) sys.exit(0) # try to force an exit else: if argv: from merlin import main main(['install'] + argv) else: print "Merlin version", branch, "has been installed."
import merlin except ImportError: egg = None try: egg = download_merlin(delay=0) sys.path.insert(0,egg) from merlin import main return main(['install'] + list(argv) + [egg]) # we're done here finally: if egg and os.path.exists(egg): os.unlink(egg) import merlin try: merlin.require(reqSpec) except merlin.VersionConflict: from merlin import main main(list(argv)+[download_merlin(delay=0)]) sys.exit(0) # try to force an exit else: if argv: from merlin import main main(['install'] + argv) else: print "Merlin version",branch,"has been installed." if __name__=='__main__': main(sys.argv[1:])
try: import merlin except ImportError: egg = None try: egg = download_merlin(delay=0) sys.path.insert(0, egg) from merlin import main return main(['install'] + list(argv) + [egg]) # we're done here finally: if egg and os.path.exists(egg): os.unlink(egg) import merlin try: merlin.require(reqSpec) except merlin.VersionConflict: from merlin import main main(list(argv) + [download_merlin(delay=0)]) sys.exit(0) # try to force an exit else: if argv: from merlin import main main(['install'] + argv) else: print "Merlin version", branch, "has been installed." if __name__ == '__main__': main(sys.argv[1:])