print "(You can then move it back later.)" print print "Press any key to quit..." raw_input() sys.exit(2) gitUtils.ensureGitBash(__file__) # Check python version if sys.hexversion < 0x02070000 or sys.hexversion >= 0x03000000: print "ERROR: LTLMoP requires Python 2.7.x" print "Press any key to quit..." raw_input() sys.exit(2) catUtils.patrickSays("Let's get your LTLMoP installation ready for use.") # Find src/ directory root_dir = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) src_dir = os.path.join(root_dir, "src") print "\n>>> Pre-compiling all modules...\n" os.chdir(src_dir) compileall.compile_dir("lib", quiet=True) print "\n>>> Building synthesis subsystem...\n" jtlv_dir = os.path.join(src_dir, "etc", "jtlv") runProgramWithLiveOutput(jtlv_dir, os.path.join(jtlv_dir, "build.sh"), shell=True) print "\n>>> Checkout out submodules...\n" slurp_dir = os.path.join(src_dir, "etc", "SLURP")
print "(You can then move it back later.)" print print "Press any key to quit..." raw_input() sys.exit(2) gitUtils.ensureGitBash(__file__) # Check python version if sys.hexversion < 0x02070000: print "ERROR: LTLMoP requires Python 2.7+" print "Press any key to quit..." raw_input() sys.exit(2) catUtils.patrickSays("Let's get your LTLMoP installation ready for use.") # Find src/ directory root_dir = os.path.normpath( os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) src_dir = os.path.join(root_dir, "src") print "\n>>> Pre-compiling all modules...\n" os.chdir(src_dir) compileall.compile_dir("lib", quiet=True) print "\n>>> Building synthesis subsystem...\n" jtlv_dir = os.path.join(src_dir, "etc", "jtlv") runProgramWithLiveOutput(jtlv_dir, os.path.join(jtlv_dir, "build.sh"), shell=True)
# From http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267197 global github_username, github_password base64string = base64.encodestring('%s:%s' % (github_username, github_password))[:-1] authheader = "Basic %s" % base64string req.add_header("Authorization", authheader) f = urllib2.urlopen(req) response = json.load(f) f.close() return response if __name__ == "__main__": gitUtils.ensureGitBash(__file__) patrickSays("Hi! I'm a harmless cat who's going to help you out with Git.") print print "Hey there, let's get you set up to work with LTLMoP on GitHub." print "(Tip: If you mess up and want to restart this process, press Ctrl-C at any time to quit.)" print have_account = '' while have_account.lower() not in ['y','n']: have_account = raw_input("First off, do you already have an account on GitHub? (y/n): ") print if have_account.lower() == 'n': print "No problem, let's send you over to the GitHub user registration website." print "Please sign up for a new account and then come back here when you're done." print