parameters: ()
return_statement: return python_cmd
docstring: Grabs the Python implementation from the Impala toolchain, using the machinery from
       bin/bootstrap_toolchain.py.
       Skip the download if SKIP_TOOLCHAIN_BOOTSTRAP=true in the environment. In that case
       only the presence of the Python executable is checked in the toolchain location.
docstring_summary: Grabs the Python implementation from the Impala toolchain, using the machinery from
       bin/bootstrap_toolchain.py.
       Skip the download if SKIP_TOOLCHAIN_BOOTSTRAP=true in the environment. In that case
       only the presence of the Python executable is checked in the toolchain location.
docstring_tokens: Grabs the Python implementation from the Impala toolchain using the machinery from bin / bootstrap_toolchain . py . Skip the download if SKIP_TOOLCHAIN_BOOTSTRAP = true in the environment . In that case only the presence of the Python executable is checked in the toolchain location .
function: def download_toolchain_python():
    '''Grabs the Python implementation from the Impala toolchain, using the machinery from
       bin/bootstrap_toolchain.py.
       Skip the download if SKIP_TOOLCHAIN_BOOTSTRAP=true in the environment. In that case
       only the presence of the Python executable is checked in the toolchain location.
    '''
  
    toolchain_packages_home = os.environ.get("IMPALA_TOOLCHAIN_PACKAGES_HOME")
    if not toolchain_packages_home:
      raise Exception("Impala environment not set up correctly, make sure "
          "$IMPALA_TOOLCHAIN_PACKAGES_HOME is set.")
  
    package = ToolchainPackage("python")
    if package.needs_download() and \
       not (os.environ.get(SKIP_TOOLCHAIN_BOOTSTRAP) == 'true'):
      package.download()
    python_cmd = os.path.join(package.pkg_directory(), "bin/python")
    if not os.path.exists(python_cmd):
      raise Exception("Unexpected error bootstrapping python from toolchain: {0} does not "
                      "exist".format(python_cmd))
    return python_cmd
function_tokens: def download_toolchain_python ( ) : toolchain_packages_home = os . environ . get ( "IMPALA_TOOLCHAIN_PACKAGES_HOME" ) if not toolchain_packages_home : raise Exception ( "Impala environment not set up correctly, make sure " "$IMPALA_TOOLCHAIN_PACKAGES_HOME is set." ) package = ToolchainPackage ( "python" ) if package . needs_download ( ) and not ( os . environ . get ( SKIP_TOOLCHAIN_BOOTSTRAP ) == 'true' ) : package . download ( ) python_cmd = os . path . join ( package . pkg_directory ( ) , "bin/python" ) if not os . path . exists ( python_cmd ) : raise Exception ( "Unexpected error bootstrapping python from toolchain: {0} does not " "exist" . format ( python_cmd ) ) return python_cmd