def find_version()

in setup.py [0:0]


def find_version(version_file_path):
    file_path = os.path.abspath(os.path.dirname(__file__))
    version_file_path = os.path.join(file_path, version_file_path)
    version_file = open(version_file_path, "r").read()
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              version_file, re.M)
    if version_match:
        print(version_match.group(1))
        return version_match.group(1)
    raise RuntimeError("Unable to find version string.")