Ejemplo n.º 1
0
def setup_outline_environment(version="latest", repos=None):
    """
    Sets up the environment to execute a specific version
    of outline,
    """
    override = ""
    if repos:
        override = "[OVERRIDE] "
        versions.set_repos(repos)
    versions.require("outline", version)

    logger.info("%sPyOutline repository: %s" %
                (override, versions.get_repos()))
    logger.info("PyOutline version: %s" % version)
Ejemplo n.º 2
0
def build_command(launcher, layer):
    """
    Build and return a pycurun shell command for the given layer

    @type  launcher : OutlineLauncher
    @param launcher : The outline launcher.

    @type  layer : Layer
    @param layer : The layer to build a command for.

    @rtype: list
    @return: The shell command to run for a the given layer.
        """
    command = []

    if layer.get_arg("strace"):
        command.append("strace")
        command.append("-ttt")
        command.append("-T")
        command.append("-e")
        command.append("open,stat")
        command.append("-f")
        command.append("-o")
        command.append("%s/strace.log" % layer.get_path())

    if layer.get_arg("wrapper"):
        wrapper = layer.get_arg("wrapper")
    elif layer.get_arg("setshot", True):
        wrapper = "%s/opencue_wrap_frame" % config.get("outline",
                                                       "wrapper_dir")
    else:
        wrapper = "%s/opencue_wrap_frame_no_ss" % config.get(
            "outline", "wrapper_dir")

    command.append(wrapper)
    command.append(config.get("outline", "user_dir"))
    command.append("%s/pycuerun" % config.get("outline", "bin_dir"))
    command.append("%s -e #IFRAME#-%s" %
                   (launcher.get_outline().get_path(), layer.get_name()))
    command.append("--version %s" % versions.get_version("outline"))
    command.append("--repos %s" % versions.get_repos())
    command.append("--debug")

    if launcher.get("dev"):
        command.append("--dev")

    if launcher.get("devuser"):
        command.append("--dev-user %s" % launcher.get("devuser"))

    return command
Ejemplo n.º 3
0
def build_command(ol, layer, frame):
    """
    Build and return a pycurun shell command for the given layer frame.

    :type  layer : Layer
    :param layer : The layer to build a command for.

    :rtype: string
    :return: The shell command to run for a the given layer.
    """
    command = []
    command.append("%s/local_wrap_frame" % config.get("outline","wrapper_dir"))
    command.append(config.get("outline", "user_dir"))
    command.append(ol.get_show())
    command.append(ol.get_shot())
    command.append("%s/pycuerun" % config.get("outline", "bin_dir"))
    command.append("%s -e  %d-%s" % (ol.get_path(),  frame, layer.get_name()))
    command.append(" -v %s" % versions.get_version("outline"))
    command.append(" -r %s" % versions.get_repos())
    command.append("-D")

    return command