import io


def get_description(location):
    """
    Return description from podspec.

    https://guides.cocoapods.org/syntax/podspec.html#description
    description is in the form:
    spec.description = <<-DESC
                     Computes the meaning of life.
                     Features:
                     1. Is self aware
                     ...
                     42. Likes candies.
                    DESC
    """
    with io.open(location, encoding='utf-8', closefd=True) as data:
        lines = data.readlines()
    description = ''
    for i, content in enumerate(lines):
        if '.description' in content:
            for cont in lines[i+1:]:
                if 'DESC' in cont:
                    break
                description += ' '.join([description, cont.strip()])
            break
    description.strip()
    return description