parameters: (pieces)
return_statement: return rendered
docstring: Build up version string, with post-release "local version identifier".
  
      Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
      get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
  
      Exceptions:
      1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
docstring_summary: Build up version string, with post-release "local version identifier".
docstring_tokens: Build up version string with post - release local version identifier .
function: def render_pep440(pieces):
      """Build up version string, with post-release "local version identifier".
  
      Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
      get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
  
      Exceptions:
      1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
      """
      if pieces["closest-tag"]:
          rendered = pieces["closest-tag"]
          if pieces["distance"] or pieces["dirty"]:
              rendered += plus_or_dot(pieces)
              rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
              if pieces["dirty"]:
                  rendered += ".dirty"
      else:
          # exception #1
          rendered = "0+untagged.%d.g%s" % (pieces["distance"],
                                            pieces["short"])
          if pieces["dirty"]:
              rendered += ".dirty"
      return rendered
function_tokens: def render_pep440 ( pieces ) : if pieces [ "closest-tag" ] : rendered = pieces [ "closest-tag" ] if pieces [ "distance" ] or pieces [ "dirty" ] : rendered += plus_or_dot ( pieces ) rendered += "%d.g%s" % ( pieces [ "distance" ] , pieces [ "short" ] ) if pieces [ "dirty" ] : rendered += ".dirty" else : # exception #1 rendered = "0+untagged.%d.g%s" % ( pieces [ "distance" ] , pieces [ "short" ] ) if pieces [ "dirty" ] : rendered += ".dirty" return rendered