コード例 #1
0
def _FWD__invoke_suite_tool_alias(context_name, tool_name, _script, _cli_args):
    suite_path = os.path.dirname(os.path.dirname(_script))
    path = os.path.join(suite_path, "contexts", "%s.rxt" % context_name)
    context = ResolvedContext.load(path)

    from rez.wrapper import Wrapper
    w = Wrapper.__new__(Wrapper)
    w._init(suite_path, context_name, context, tool_name)
    retcode = w.run(*_cli_args)
    sys.exit(retcode)
コード例 #2
0
ファイル: suite.py プロジェクト: mstreatfield/rez
def _FWD__invoke_suite_tool_alias(context_name, tool_name, prefix_char=None, _script=None, _cli_args=None):
    suite_path = os.path.dirname(os.path.dirname(_script))
    path = os.path.join(suite_path, "contexts", "%s.rxt" % context_name)
    context = ResolvedContext.load(path)

    from rez.wrapper import Wrapper

    w = Wrapper.__new__(Wrapper)
    w._init(suite_path, context_name, context, tool_name, prefix_char)
    retcode = w.run(*(_cli_args or []))
    sys.exit(retcode)
コード例 #3
0
ファイル: suite.py プロジェクト: wwfxuk/rez
def _FWD__invoke_suite_tool_alias(context_name,
                                  tool_name,
                                  prefix_char=None,
                                  re_resolve=False,
                                  _script=None,
                                  _cli_args=None):
    suite_path = os.path.dirname(os.path.dirname(_script))
    path = os.path.join(suite_path, "contexts", "%s.rxt" % context_name)
    context = ResolvedContext.load(path)
    if re_resolve:
        context = context.re_resolved(context)

    from rez.wrapper import Wrapper
    w = Wrapper.__new__(Wrapper)
    w._init(suite_path, context_name, context, tool_name, prefix_char)
    retcode = w.run(*(_cli_args or []))
    sys.exit(retcode)
コード例 #4
0
def _FWD__invoke_suite_tool_alias_in_live(package_requests,
                                          context_name,
                                          tool_name,
                                          prefix_char=None,
                                          _script=None,
                                          _cli_args=None):
    # Load configs
    from rez.resolved_context import ResolvedContext
    from rez.config import _load_config_from_filepaths, config
    configs = find_configs(os.getcwd())
    overrides, _ = _load_config_from_filepaths(configs)
    for key, value in overrides.items():
        config.override(key, value)

    suite_path = os.path.dirname(os.path.dirname(_script))
    context = ResolvedContext(package_requests)

    from rez.wrapper import Wrapper
    w = Wrapper.__new__(Wrapper)
    w._init(suite_path, context_name, context, tool_name, prefix_char)
    retcode = w.run(*(_cli_args or []))
    sys.exit(retcode)