version.py 500 B

123456789101112131415161718
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. __version__ = '0.1.6'
  3. def parse_version_info(version_str):
  4. version_info = []
  5. for x in version_str.split('.'):
  6. if x.isdigit():
  7. version_info.append(int(x))
  8. elif x.find('rc') != -1:
  9. patch_version = x.split('rc')
  10. version_info.append(int(patch_version[0]))
  11. version_info.append(f'rc{patch_version[1]}')
  12. return tuple(version_info)
  13. version_info = parse_version_info(__version__)