def _setup_info_xml(self, languageList):
infoXmlFile = os.path.join(self._tk_dir, '<STR_LIT>')<EOL>print('<STR_LIT>', infoXmlFile)<EOL>try:<EOL><INDENT>TopologySplpyResourceMessageSetFound = False<EOL>TopologySplpyResourceLanguages = []<EOL>tree = ET.parse(infoXmlFile)<EOL>root = tree.getroot()<EOL>for resources in root.findall('<STR_LIT>'):<EOL><INDENT>if self._cmd_args.verbose:<EOL><INDENT>print('<STR_LIT>', resources.tag)<EOL><DEDENT>for messageSet in resources.findall('<STR_LIT>'):<EOL><INDENT>if self._cmd_args.verbose:<EOL><INDENT>print('<STR_LIT>', messageSet.tag, messageSet.attrib)<EOL><DEDENT>if '<STR_LIT:name>' in messageSet.attrib:<EOL><INDENT>if messageSet.attrib['<STR_LIT:name>'] == '<STR_LIT>':<EOL><INDENT>TopologySplpyResourceMessageSetFound = True<EOL>for lang in messageSet.findall('<STR_LIT>'):<EOL><INDENT>language = os.path.dirname(lang.text)<EOL>TopologySplpyResourceLanguages.append(language)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>if TopologySplpyResourceMessageSetFound:<EOL><INDENT>TopologySplpyResourceLanguages.sort()<EOL>languageList.sort()<EOL>copiedLanguagesSet = set(languageList)<EOL>resourceLanguageSet = set(TopologySplpyResourceLanguages)<EOL>if self._cmd_args.verbose:<EOL><INDENT>print('<STR_LIT>', languageList)<EOL>print('<STR_LIT>', TopologySplpyResourceLanguages)<EOL><DEDENT>if copiedLanguagesSet == resourceLanguageSet:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>errstr = """<STR_LIT>""" + _INFO_XML_TEMPLATE<EOL>sys.exit(errstr)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>errstr = """<STR_LIT>""" + _INFO_XML_TEMPLATE<EOL>sys.exit(errstr)<EOL><DEDENT><DEDENT>except FileNotFoundError as e:<EOL><INDENT>print("<STR_LIT>")<EOL>projectRootDir = os.path.abspath(self._tk_dir) <EOL>projectName = os.path.basename(projectRootDir)<EOL>infoXml=_INFO_XML_TEMPLATE.replace('<STR_LIT>', projectName)<EOL>f = open(infoXmlFile, '<STR_LIT:w>')<EOL>f.write(infoXml)<EOL>f.close()<EOL><DEDENT>except SystemExit as e:<EOL><INDENT>raise e<EOL><DEDENT>except:<EOL><INDENT>errstr = """<STR_LIT>""" + _INFO_XML_TEMPLATE<EOL>sys.exit(errstr)<EOL><DEDENT>
Setup the info.xml file

        This function prepares or checks the info.xml file in the project directory
        - if the info.xml does not exist in the project directory, it copies the template info.xml into the project directory.
          The project name is obtained from the project directory name
        - If there is a info.xml file, the resource section is inspected. If the resource section has no valid message set
          description for the TopologySplpy Resource a warning message is printed