def install_upgrade(package, upgrade=False, progress_hook=None):
 global hook_download_filename
 if upgrade:
  operation = '[up] upgrading'
 else:
  operation = '[in] installing'
 logger.info("{0} '{1}' to {2}".format(operation, package.name, dataset_data_path))
 remote_src = package.source
 package.where = dataset_data_path
 cached = False
 if (not cached):
  hook_download_filename = remote_src
  temp_filename = download_from_url(remote_src, filename=None, progress_hook=progress_hook)
 else:
  pass
 logger.info("[in] running install scripts for package '{0}'".format(package.name))
 install_package(package, temp_filename, dataset_data_path)
 update_installed_list('i', package)

def install_upgrade ( package , upgrade = False , progress_hook = None ) : global hook_download_filename if upgrade : operation = '[up] upgrading' else : operation = '[in] installing' logger . info ( "{0} '{1}' to {2}" . format ( operation , package . name , dataset_data_path ) ) remote_src = package . source package . where = dataset_data_path cached = False if ( not cached ) : hook_download_filename = remote_src temp_filename = download_from_url ( remote_src , filename = None , progress_hook = progress_hook ) else : pass logger . info ( "[in] running install scripts for package '{0}'" . format ( package . name ) ) install_package ( package , temp_filename , dataset_data_path ) update_installed_list ( 'i' , package )
this function installs or upgrades a package .