def req_yaml_template(pip=False, version=True, build=False):
    """
    Builds a template string for requirement lines in the YAML format.

    :pip: [bool] Whether to build a Conda requirement line or a pip line
    :version: [bool] Includes the version template
    :build: [bool] Includes the build template.  Makes version "=*" if the 
        `version` is False for Conda packages.

    :returns: [str] The requirement string template.
    """
    template_str = '{name}'
    if version:
        template_str += '=={version}' if pip else '={version}'
    if build and not pip:
        if not version:
            template_str += '=*'
        template_str += '={build_string}'
    return template_str