def METHOD_NAME(path):
    # Check for GPL (forbidden) and LGPL (need to ship source)
    # This is not meant to be an exhaustive check.
    def check_license(license_file):
        with open(license_file) as f:
            data = f.read()
            is_lgpl = 'GNU LESSER GENERAL PUBLIC LICENSE' in data.upper()
            # The LGPL refers to the GPL in-text
            # Case-sensitive for GPL to match license text and not PSF license reference
            is_gpl = 'GNU GENERAL PUBLIC LICENSE' in data and not is_lgpl
            return (is_gpl, is_lgpl)
    def find_embedded_source_version(path, name):
        files = os.listdir(path)
        tgz_files = [f for f in files if f.endswith('.tar.gz')]
        for tgz in tgz_files:
            pkg_name = tgz.split('-')[0].split('_')[0]
            if pkg_name == name:
                return tgz.split('-')[1].split('.tar.gz')[0]
        return None
    list = {}
    for txt_file in glob.glob('%s/*.txt' % path):
        filename = txt_file.split('/')[-1]
        name = filename[:-4].lower()
        (is_gpl, is_lgpl) = check_license(txt_file)
        list[name] = {
            'name': name,
            'filename': filename,
            'gpl': is_gpl,
            'source_required': (is_gpl or is_lgpl),
            'source_version': find_embedded_source_version(path, name),
        }
    return list