Example #1
0
def main():
    """Main entry point of the program"""

    parser = argparse.ArgumentParser(
        description=_(
            "Deploy and setup developers environment easily on ubuntu"),
        epilog=_(
            "Note that you can also configure different debug logs behaviors using "
            "LOG_CFG pointing to a log yaml profile."),
        add_help=False)
    parser.add_argument('--help', action=_HelpAction,
                        help=_('Show this help'))  # add custom help
    parser.add_argument("-v",
                        "--verbose",
                        action="count",
                        default=0,
                        help=_("Increase output verbosity (2 levels)"))

    parser.add_argument('-r',
                        '--remove',
                        action="store_true",
                        help=_("Remove specified framework if installed"))

    # set logging ignoring unknown options
    set_logging_from_args(sys.argv, parser)

    mainloop = MainLoop()

    # load frameworks and initialize parser
    load_frameworks()
    cli.main(parser)

    mainloop.run()
Example #2
0
def main():
    """Main entry point of the program"""

    if "udtc" in sys.argv[0]:
        print(_("WARNING: 'udtc' command is the previous name of Ubuntu Make. Please use the 'umake' command from now "
                "on providing the exact same features. The 'udtc' command will be removed soon."))

    parser = argparse.ArgumentParser(description=_("Deploy and setup developers environment easily on ubuntu"),
                                     epilog=_("Note that you can also configure different debug logging behavior using "
                                              "LOG_CFG that points to a log yaml profile."),
                                     add_help=False)
    parser.add_argument('--help', action=_HelpAction, help=_('Show this help'))  # add custom help
    parser.add_argument("-v", "--verbose", action="count", default=0, help=_("Increase output verbosity (2 levels)"))

    parser.add_argument('-r', '--remove', action="store_true", help=_("Remove specified framework if installed"))

    parser.add_argument('--version', action="store_true", help=_("Print version and exit"))

    # set logging ignoring unknown options
    set_logging_from_args(sys.argv, parser)

    mainloop = MainLoop()

    # load frameworks and initialize parser
    load_frameworks()
    cli.main(parser)

    mainloop.run()
Example #3
0
def main():
    """Main entry point of the program"""

    if "udtc" in sys.argv[0]:
        print(
            _("WARNING: 'udtc' command is the previous name of Ubuntu Make. Please use the 'umake' command from now "
              "on providing the exact same features. The 'udtc' command will be removed soon."
              ))

    parser = argparse.ArgumentParser(
        description=_(
            "Deploy and setup developers environment easily on ubuntu"),
        epilog=_(
            "Note that you can also configure different debug logging behavior using "
            "LOG_CFG that points to a log yaml profile."),
        add_help=False)
    parser.add_argument('--help', action=_HelpAction,
                        help=_('Show this help'))  # add custom help
    parser.add_argument("-v",
                        "--verbose",
                        action="count",
                        default=0,
                        help=_("Increase output verbosity (2 levels)"))

    parser.add_argument('-r',
                        '--remove',
                        action="store_true",
                        help=_("Remove specified framework if installed"))

    list_group = parser.add_argument_group(
        "List frameworks").add_mutually_exclusive_group()
    list_group.add_argument('-l',
                            '--list',
                            action="store_true",
                            help=_("List all frameworks"))
    list_group.add_argument('--list-installed',
                            action="store_true",
                            help=_("List installed frameworks"))
    list_group.add_argument('--list-available',
                            action="store_true",
                            help=_("List installable frameworks"))

    parser.add_argument('--version',
                        action="store_true",
                        help=_("Print version and exit"))

    # set logging ignoring unknown options
    set_logging_from_args(sys.argv, parser)

    mainloop = MainLoop()

    # load frameworks
    load_frameworks(force_loading=should_load_all_frameworks(sys.argv))

    # initialize parser
    cli.main(parser)

    mainloop.run()
Example #4
0
    def setUpClass(cls):
        super().setUpClass()
        importlib.reload(umake.frameworks)

        change_xdg_path('XDG_CONFIG_HOME', os.path.join(get_data_dir(), 'configs', "foo"))

        sys.path.append(get_data_dir())
        cls.testframeworks_dir = os.path.join(get_data_dir(), 'testframeworks')

        with patchelem(umake.frameworks, '__file__', os.path.join(cls.testframeworks_dir, '__init__.py')),\
                patchelem(umake.frameworks, '__package__', "testframeworks"):
            frameworks.load_frameworks()
        # patch the BaseCategory dictionary from the umake.ui.cli one
        umake.ui.cli.BaseCategory = frameworks.BaseCategory
Example #5
0
    def setUpClass(cls):
        super().setUpClass()
        importlib.reload(umake.frameworks)

        change_xdg_path('XDG_CONFIG_HOME',
                        os.path.join(get_data_dir(), 'configs', "foo"))

        sys.path.append(get_data_dir())
        cls.testframeworks_dir = os.path.join(get_data_dir(), 'testframeworks')

        with patchelem(umake.frameworks, '__file__', os.path.join(cls.testframeworks_dir, '__init__.py')),\
                patchelem(umake.frameworks, '__package__', "testframeworks"):
            frameworks.load_frameworks()
        # patch the BaseCategory dictionary from the umake.ui.cli one
        umake.ui.cli.BaseCategory = frameworks.BaseCategory
Example #6
0
def main():
    """Main entry point of the program"""

    parser = argparse.ArgumentParser(description=_("Deploy and setup developers environment easily on ubuntu"),
                                     epilog=_("Note that you can also configure different debug logs behaviors using "
                                              "LOG_CFG pointing to a log yaml profile."),
                                     add_help=False)
    parser.add_argument('--help', action=_HelpAction, help=_('Show this help'))  # add custom help
    parser.add_argument("-v", "--verbose", action="count", default=0, help=_("Increase output verbosity (2 levels)"))

    parser.add_argument('-r', '--remove', action="store_true", help=_("Remove specified framework if installed"))

    # set logging ignoring unknown options
    set_logging_from_args(sys.argv, parser)

    mainloop = MainLoop()

    # load frameworks and initialize parser
    load_frameworks()
    cli.main(parser)

    mainloop.run()