docs: def get_version():
      """Get the current version from a git tag, or by reading tcod/version.py"""
      try:
          tag = check_output(
              ["git", "describe", "--abbrev=0"], universal_newlines=True
          ).strip()
          assert not tag.startswith("v")
          version = tag
  
          # add .devNN if needed
          log = check_output(
              ["git", "log", "%s..HEAD" % tag, "--oneline"],
              universal_newlines=True,
          )
          commits_since_tag = log.count("\n")
          if commits_since_tag:
              version += ".dev%i" % commits_since_tag
  
          # update tcod/version.py
          open("tcod/version.py", "w").write('__version__ = "%s"\n' % version)
          return version
      except:
          exec(open("tcod/version.py").read(), globals())
          return __version__