Lines Matching refs:license_file
127 def grep_license_keyword(license_file): argument
129 with open(license_file, "r") as input_file:
132 return License(LicenseType.APACHE2, license_file)
134 return License(LicenseType.MIT, license_file)
136 return License(LicenseType.BSD_LIKE, license_file)
137 print("ERROR: cannot decide license type in", license_file,
139 return License(LicenseType.BSD_LIKE, license_file)
166 license_file = None
167 for license_file in glob.glob("LICENSE*"):
168 lowered_name = license_file.lower()
170 licenses.append(License(LicenseType.APACHE2, license_file))
172 licenses.append(License(LicenseType.MIT, license_file))
176 if not license_file:
181 return [License(LicenseType.APACHE2, license_file)]
183 return [License(LicenseType.MIT, license_file)]
185 return [License(LicenseType.BSD_LIKE, license_file)]
187 return [License(LicenseType.ISC, license_file)]
188 return [grep_license_keyword(license_file)]