def get_version_from_setup_file():
    """parse version info from setup.py file.

    Return the version string.

    """
    with open('setup.py', 'r') as f:
        for line in f:
            if 'version=' in line:
                return line.split('=')[1][1:-3]
    raise Exception('version not found in setup.py')
