parameters: (config, section, staging_dir, src_dir)
docstring: Copies installer archive files specified in section from src_dir to
    staging_dir. This method reads section from config and copies all the
    files specified from src_dir to staging dir.
docstring_summary: Copies installer archive files specified in section from src_dir to
    staging_dir. This method reads section from config and copies all the
    files specified from src_dir to staging dir.
docstring_tokens: Copies installer archive files specified in section from src_dir to staging_dir . This method reads section from config and copies all the files specified from src_dir to staging dir .
function: def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir):
    """Copies installer archive files specified in section from src_dir to
    staging_dir. This method reads section from config and copies all the
    files specified from src_dir to staging dir.
    """
    for option in config.options(section):
      if option.endswith('dir'):
        continue
  
      dst_dir = os.path.join(staging_dir, config.get(section, option))
      src_paths = glob.glob(os.path.join(src_dir, option))
      if src_paths and not os.path.exists(dst_dir):
        os.makedirs(dst_dir)
      for src_path in src_paths:
        dst_path = os.path.join(dst_dir, os.path.basename(src_path))
        if not os.path.exists(dst_path):
          shutil.copy(src_path, dst_dir)
function_tokens: def CopySectionFilesToStagingDir ( config , section , staging_dir , src_dir ) : for option in config . options ( section ) : if option . endswith ( 'dir' ) : continue dst_dir = os . path . join ( staging_dir , config . get ( section , option ) ) src_paths = glob . glob ( os . path . join ( src_dir , option ) ) if src_paths and not os . path . exists ( dst_dir ) : os . makedirs ( dst_dir ) for src_path in src_paths : dst_path = os . path . join ( dst_dir , os . path . basename ( src_path ) ) if not os . path . exists ( dst_path ) : shutil . copy ( src_path , dst_dir )