def merge_source_requirements(sources):
    """
    Read requirements source files and merge it's content.
    """
    projects = set()
    merged_requirements = []
    for infile_path in (locate_file(p, must_exist=True) for p in sources):
        for req in load_requirements(infile_path):
            if hasattr(req, "requirement"):
                # Requirements starting with project name "project ..."
                parsedreq = parse_req_from_line(req.requirement, req.line_source)
                if parsedreq.requirement:
                    # Skip already added project name
                    if parsedreq.requirement.name in projects:
                        continue
                    projects.add(parsedreq.requirement.name)
                    merged_requirements.append(req)

                # Requirements lines like "vcs+proto://url"
                elif parsedreq.link:
                    merged_requirements.append(req)
                else:
                    raise RuntimeError("Unexpected requirement {0}".format(req))
            else:
                if req.req:
                    # Skip already added project name
                    if req.name in projects:
                        continue
                    projects.add(req.name)
                    merged_requirements.append(req)

                # Requirements lines like "vcs+proto://url"
                elif req.link:
                    merged_requirements.append(req)
                else:
                    raise RuntimeError("Unexpected requirement {0}".format(req))

    return merged_requirements

    Read requirements source files and merge it's content.
    
scripts/fixate-requirements.py