version.py 479 B

1234567891011121314151617
  1. __version__ = '0.1.2'
  2. short_version = __version__
  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__)