def setup_fast_link_builders(top_env):
 acquire_temp_place = "df | grep tmpfs | awk '{print $5, $6}'"
 p = subprocess.Popen(acquire_temp_place, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, universal_newlines=True)
 (stdout, stderr) = p.communicate()
 if p.returncode:
  console.warning('you have link on tmp enabled, but it is not fullfilled to make it.')
  return
 if (not stdout):
  console.warning('you have link on tmp enabled, but there is no tmpfs to make it.')
  return
 global linking_tmp_dir
 (usage, linking_tmp_dir) = tuple(stdout.splitlines(False)[0].split())
 usage = int(usage.replace('%', ''))
 if (usage > 90):
  console.warning(('you have link on tmp enabled, but there is not enough space on %s to make it.' % linking_tmp_dir))
  return
 console.info('building in link on tmpfs mode')
 setup_fast_link_sharelib_builder(top_env)
 setup_fast_link_prog_builder(top_env)

def setup_fast_link_builders ( top_env ) : acquire_temp_place = "df | grep tmpfs | awk '{print $5, $6}'" p = subprocess . Popen ( acquire_temp_place , env = os . environ , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = True , universal_newlines = True ) ( stdout , stderr ) = p . communicate ( ) if p . returncode : console . warning ( 'you have link on tmp enabled, but it is not fullfilled to make it.' ) return if ( not stdout ) : console . warning ( 'you have link on tmp enabled, but there is no tmpfs to make it.' ) return global linking_tmp_dir ( usage , linking_tmp_dir ) = tuple ( stdout . splitlines ( False ) [ 0 ] . split ( ) ) usage = int ( usage . replace ( '%' , '' ) ) if ( usage > 90 ) : console . warning ( ( 'you have link on tmp enabled, but there is not enough space on %s to make it.' % linking_tmp_dir ) ) return console . info ( 'building in link on tmpfs mode' ) setup_fast_link_sharelib_builder ( top_env ) setup_fast_link_prog_builder ( top_env )
creates fast link builders - program and sharedlibrary .