#NEWLINE# def _setup_distribution_environment( ignore_distcheck = False ) : #NEWLINE# #INDENT# 'Setup distribution environment.\n\n    In low-level terms, this method attempts to populate various values in the fabric\n    env data structure for use other places in CloudBioLinux.\n    ' #NEWLINE# if ( 'distribution' not in env ) : #NEWLINE# #INDENT# env . distribution = '__auto__' #NEWLINE# #UNINDENT# if ( 'dist_name' not in env ) : #NEWLINE# #INDENT# env . dist_name = '__auto__' #NEWLINE# #UNINDENT# env . logger . info ( ( 'Distribution %s' % env . distribution ) ) #NEWLINE# if ( env . hosts == [ 'vagrant' ] ) : #NEWLINE# #INDENT# _setup_vagrant_environment ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . hosts == [ 'localhost' ] ) : #NEWLINE# #INDENT# _setup_local_environment ( ) #NEWLINE# #UNINDENT# #UNINDENT# configure_runsudo ( env ) #NEWLINE# if ( env . distribution == '__auto__' ) : #NEWLINE# #INDENT# env . distribution = _determine_distribution ( env ) #NEWLINE# #UNINDENT# if ( env . distribution == 'ubuntu' ) : #NEWLINE# #INDENT# if ( env . dist_name == '__auto__' ) : #NEWLINE# #INDENT# env . dist_name = _ubuntu_dist_name ( env ) #NEWLINE# #UNINDENT# _setup_ubuntu ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . distribution == 'centos' ) : #NEWLINE# #INDENT# _setup_centos ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . distribution == 'scientificlinux' ) : #NEWLINE# #INDENT# _setup_scientificlinux ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . distribution == 'debian' ) : #NEWLINE# #INDENT# if ( env . dist_name == '__auto__' ) : #NEWLINE# #INDENT# env . dist_name = _debian_dist_name ( env ) #NEWLINE# #UNINDENT# _setup_debian ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . distribution == 'arch' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . distribution == 'suse' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( env . distribution == 'macosx' ) : #NEWLINE# #INDENT# _setup_macosx ( env ) #NEWLINE# ignore_distcheck = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( 'Unexpected distribution %s' % env . distribution ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not ignore_distcheck ) : #NEWLINE# #INDENT# _validate_target_distribution ( env . distribution , env . get ( 'dist_name' , None ) ) #NEWLINE# #UNINDENT# _cloudman_compatibility ( env ) #NEWLINE# _setup_nixpkgs ( ) #NEWLINE# _setup_fullpaths ( env ) #NEWLINE# machine = env . safe_run_output ( 'uname -m' ) #NEWLINE# env . is_64bit = ( machine . find ( '_64' ) > 0 )