def _get_version()

in setup.py [0:0]


def _get_version():
  version_file = os.path.join(os.path.dirname(__file__),
                              'tfx_addons/__init__.py')
  with open(version_file, 'r') as fp:
    version_file_text = fp.read()

  version_match = re.search(
      r"^__version__ = ['\"]([^'\"]*)['\"]",
      version_file_text,
      re.M,
  )
  if version_match:
    return version_match.group(1)
  else:
    raise RuntimeError("Unable to find version string.")