(*filepath)
| 54 | |
| 55 | |
| 56 | def find_version(*filepath): |
| 57 | # Extract version information from filepath |
| 58 | with open(os.path.join(ROOT_DIR, *filepath)) as fp: |
| 59 | version_match = re.search(r"^version = ['\"]([^'\"]*)['\"]", fp.read(), re.M) |
| 60 | if version_match: |
| 61 | return version_match.group(1) |
| 62 | raise RuntimeError("Unable to find version string.") |
| 63 | |
| 64 | |
| 65 | class SetupType(Enum): |