def getNameBuiltwithpip(lines):
    """
    Used if buildWithPip == True.
    If the file contains "%define pipname packagename", returns packagename.
    None otherwise
    """
    name = None
    for line in lines:
        if line.startswith("%define"):
            if "pip_name" in line:
                name = line.split()[-1]
    return name