parameters: ()
return_statement: return artifact_name
docstring: Create an archive with an appropriate name. Including version, OS, and architecture.
docstring_summary: Create an archive with an appropriate name. Including version, OS, and architecture.
docstring_tokens: Create an archive with an appropriate name . Including version OS and architecture .
function: def get_artifact_name():
    """
    Create an archive with an appropriate name. Including version, OS, and architecture.
    """
    if IS_LINUX:
      os_str = "linux"
    elif IS_MACOS:
      os_str = "osx"
    else:
      raise NotImplementedError("Unsupported platform")
    arch = os.uname()[4]
    with open(os.path.join(SOURCE_ROOT, "version.txt"), 'r') as version:
      line = version.readline()
      # Ensure the line is a string-like object.
      try:
        line = line.decode('utf-8')
      except (UnicodeDecodeError, AttributeError):
        pass
      version = line.strip()
    artifact_name = "kudu-binary-%s-%s-%s" % (version, os_str, arch)
    return artifact_name
function_tokens: def get_artifact_name ( ) : if IS_LINUX : os_str = "linux" elif IS_MACOS : os_str = "osx" else : raise NotImplementedError ( "Unsupported platform" ) arch = os . uname ( ) [ 4 ] with open ( os . path . join ( SOURCE_ROOT , "version.txt" ) , 'r' ) as version : line = version . readline ( ) # Ensure the line is a string-like object. try : line = line . decode ( 'utf-8' ) except ( UnicodeDecodeError , AttributeError ) : pass version = line . strip ( ) artifact_name = "kudu-binary-%s-%s-%s" % ( version , os_str , arch ) return artifact_name