def adjust_options(options, args): # --- CUT here --- """ Display MENU_TXT """ sys.stderr.write(c.colorize("PyLucid virtual environment bootstrap\n\n", opts=("bold", "underscore"))) try: home_dir = args[0] except IndexError: return # caller will raise error sys.stdout.write("Create PyLucid environment in: %s" % c.colorize(home_dir, foreground="blue", opts=("bold",))) sys.stdout.write("\n\n") p = SysPath() git_path = p.find("git") if git_path: sys.stderr.write("git found in: %s\n" % c.colorize(git_path, opts=("bold",))) else: sys.stderr.write(c.colorize("ERROR:", foreground="red", opts=("underscore",))) sys.stderr.write("git not found in path!\n") if options.install_type == None: options.install_type = get_requirement_choice() elif options.install_type not in CHOICES.values(): sys.stderr.write("install type wrong!") sys.exit(-1)
def adjust_options(options, args): # --- CUT here --- """ Display MENU_TXT """ sys.stderr.write( c.colorize("PyLucid virtual environment bootstrap\n\n", opts=("bold", "underscore"))) try: home_dir = args[0] except IndexError: return # caller will raise error sys.stdout.write("Create PyLucid environment in: %s" % c.colorize(home_dir, foreground="blue", opts=("bold", ))) sys.stdout.write("\n\n") p = SysPath() git_path = p.find("git") if git_path: sys.stderr.write("git found in: %s\n" % c.colorize(git_path, opts=("bold", ))) else: sys.stderr.write( c.colorize("ERROR:", foreground="red", opts=("underscore", ))) sys.stderr.write("git not found in path!\n") if options.install_type == None: options.install_type = get_requirement_choice() elif options.install_type not in CHOICES.values(): sys.stderr.write("install type wrong!") sys.exit(-1)
def after_install(options, home_dir): # --- CUT here --- """ called after virtualenv was created and setuptools installed. Now we installed PyLucid and used libs/packages. """ a = AfterInstall(options, home_dir) a.install_packages() sys.stdout.write("\n") sys.stdout.write("PyLucid environment created in: %s\n" % c.colorize(home_dir, foreground="blue", opts=("bold",))) sys.stdout.write("\n") sys.stdout.write("Now you can create a new page instance with %s\n" % c.colorize("pylucid_install", foreground="blue", opts=("bold",))) sys.stdout.write("\n") sys.stdout.write("More Info:\n") sys.stdout.write("https://github.com/jedie/PyLucid#create-page-instance\n") sys.stdout.write("\n")