(requirements_file)
| 25 | class RequirementsValidator(object): |
| 26 | @staticmethod |
| 27 | def validate(requirements_file): |
| 28 | if not os.path.exists(requirements_file): |
| 29 | raise Exception("Requirements file %s not found." % requirements_file) |
| 30 | missing = [] |
| 31 | with open(requirements_file, "r") as f: |
| 32 | for line in f: |
| 33 | rqmnt = line.strip() |
| 34 | try: |
| 35 | get_distribution(rqmnt) |
| 36 | except: |
| 37 | missing.append(rqmnt) |
| 38 | return missing |
| 39 | |
| 40 | |
| 41 | def validate_pack_name(name): |