def find_version(*file_paths):
version_file = read(*file_paths)<EOL>version_match = re.search(r"<STR_LIT>",<EOL>version_file, re.M)<EOL>if version_match:<EOL><INDENT>return version_match.group(<NUM_LIT:1>)<EOL><DEDENT>raise RuntimeError("<STR_LIT>")<EOL>
Read the file in setup.py and parse the version with a regex.

https://packaging.python.org/guides/single-sourcing-package-version/