Ejemplo n.º 1
0
 def parse(self, tree):
     name = tree.get("name")
     if not name:
         qixml.raise_parse_error("ide node should have a name attribute",
             tree=tree)
     self.name = name
     self.path = tree.get("path")
Ejemplo n.º 2
0
 def parse(self, tree):
     name = tree.get("name")
     if not name:
         qixml.raise_parse_error("server node should have a name attribute", tree=tree)
     self.name = name
     access_tree = tree.find("access")
     if access_tree is not None:
         self.access.parse(access_tree)
Ejemplo n.º 3
0
 def parse(self, tree):
     name = tree.get("name")
     if not name:
         qixml.raise_parse_error("'config' node must have a 'name' attribute", tree=tree)
     self.name = name
     self.ide = tree.get("ide")
     env_tree = tree.find("env")
     if env_tree is not None:
         self.env.parse(env_tree)
     cmake_tree = tree.find("cmake")
     if cmake_tree is not None:
         self.cmake.parse(cmake_tree)
Ejemplo n.º 4
0
def convert_project_manifest(qibuild_manifest):
    """ Convert a on qibuild.manifest file
    (ini format) into a new qibuild.manifest
    file (xml format)

    """
    ini_cfg = qibuild.configstore.ConfigStore()
    ini_cfg.read(qibuild_manifest)
    p_names = ini_cfg.get("project", default=dict()).keys()
    if len(p_names) != 1:
        qixml.raise_parse_error("File should countain exactly one [project] section", xml_path=qibuild_manifest)
    name = p_names[0]
    project = ProjectConfig()
    project.name = name
    depends = ini_cfg.get("project.%s.depends" % name, default="").split()
    rdepends = ini_cfg.get("project.%s.rdepends" % name, default="").split()
    project.depends = set(depends)
    project.rdepends = set(rdepends)
    out = StringIO()
    project.write(out)
    return out.getvalue()