Example #1
0
 def __func():
     return helpers.list_interfaces(), SUCCESS
Example #2
0
 def __func():
     return helpers.list_interfaces(
         walkoff.config.Config.INTERFACES_PATH), SUCCESS
    args = parser.parse_args()
    return args


if __name__ == '__main__':

    args = cmd_line()
    apps = args.apps
    interfaces = args.interfaces
    from walkoff.config import Config

    if not apps:
        apps = list_apps(Config.APPS_PATH)

    if not interfaces:
        interfaces = list_interfaces(Config.INTERFACES_PATH)

    for app in apps:
        print("Installing dependencies for " + app + " App...")
        path = os.path.abspath(os.path.join('apps', app, 'requirements.txt'))
        if os.path.isfile(path) is False:
            print("No requirements.txt file found in " + app + " folder. Skipping...")
            continue
        subprocess.call(['pip', 'install', '-r', path])

    for interface in interfaces:
        print("Installing dependencies for " + interface + " Interface...")
        path = os.path.abspath(os.path.join('interfaces', interface, 'requirements.txt'))
        if os.path.isfile(path) is False:
            print("No requirements.txt file found in " + interface + " folder. Skipping...")
            continue
        'List of interfaces for which you would like to install dependencies')
    args = parser.parse_args()
    return args


if __name__ == '__main__':

    args = cmd_line()
    apps = args.apps
    interfaces = args.interfaces

    if not apps:
        apps = list_apps()

    if not interfaces:
        interfaces = list_interfaces()

    for app in apps:
        print("Installing dependencies for " + app + " App...")
        path = os.path.abspath('apps/' + app + '/requirements.txt')
        if os.path.isfile(path) is False:
            print("No requirements.txt file found in " + app +
                  " folder. Skipping...")
            continue
        pip.main(['install', '-r', path])

    for interface in interfaces:
        print("Installing dependencies for " + interface + " Interface...")
        path = os.path.abspath('interfaces/' + interface + '/requirements.txt')
        if os.path.isfile(path) is False:
            print("No requirements.txt file found in " + interface +
Example #5
0
 def __func():
     return helpers.list_interfaces(walkoff.config.Config.INTERFACES_PATH), SUCCESS
Example #6
0
def interfaces(ctx, select):
    click.echo('Installing interfaces with {}'.format(select))
    interfaces_path = ctx.obj['config'].INTERFACES_PATH if 'config' in ctx.obj else Config.INTERFACES_PATH
    interfaces_ = list_interfaces(interfaces_path) if not select else select
    install_interfaces(interfaces_, interfaces_path)
Example #7
0
def _install_all_apps_interfaces(apps_path, interfaces_path):
    apps_ = list_apps(apps_path)
    interfaces_ = list_interfaces(interfaces_path)
    install_apps(apps_, apps_path)
    install_interfaces(interfaces_, interfaces_path)
Example #8
0
def interfaces(ctx, select):
    click.echo('Installing interfaces with {}'.format(select))
    interfaces_path = ctx.obj[
        'config'].INTERFACES_PATH if 'config' in ctx.obj else Config.INTERFACES_PATH
    interfaces_ = list_interfaces(interfaces_path) if not select else select
    install_interfaces(interfaces_, interfaces_path)
Example #9
0
def _install_all_apps_interfaces(apps_path, interfaces_path):
    apps_ = list_apps(apps_path)
    interfaces_ = list_interfaces(interfaces_path)
    install_apps(apps_, apps_path)
    install_interfaces(interfaces_, interfaces_path)