version.py 890 B

1234567891011121314151617181920212223242526272829303132333435
  1. from __future__ import division, absolute_import, print_function, unicode_literals
  2. #from awlsim.common.cython_support cimport * #@cy
  3. from awlsim.common.compat import *
  4. from binascii import crc32
  5. __all__ = [
  6. "VERSION_MAJOR",
  7. "VERSION_MINOR",
  8. "VERSION_BUGFIX",
  9. "VERSION_STRING",
  10. "VERSION_ID",
  11. ]
  12. VERSION_MAJOR = 0
  13. VERSION_MINOR = 67
  14. VERSION_BUGFIX = 1
  15. VERSION_EXTRA = ""
  16. if osIsWindows and VERSION_EXTRA: #@nocov
  17. # pywin32 does not like non-numbers in the version string.
  18. # Convert the VERSION_EXTRA into a dot-number string.
  19. VERSION_EXTRA = ".0000%d0000" % (crc32(VERSION_EXTRA.encode("UTF-8")) & 0xFFFF)
  20. # Create a string from the version information.
  21. VERSION_STRING = "%d.%d.%d%s" % (VERSION_MAJOR, VERSION_MINOR,
  22. VERSION_BUGFIX, VERSION_EXTRA)
  23. # Create a 31 bit ID number from the version information.
  24. VERSION_ID = crc32(VERSION_STRING.encode("UTF-8")) & 0x7FFFFFFF