def build(project, out):
    out << Header(level=2) << "Project " \
        << FileLink(path=project.path) << project.path << Close \
        << "..." << Close << Flush

    sources = project.getSources()
    sources = sortSources(sources)    
        
    result = buildStep(project, out, project.buildPre, sources)
    if result == 0:
        result = buildStep(project, out, project.build, sources)
        if result == 0:
            result = buildStep(project, out, project.buildPost, sources)
            if not result == 0:
                return result
                        
    session = devon.projects.getSession()    
    if not project.debug:
        if project.distInstallPaths:
            installPaths(project, project.distInstallPaths, out)
         
        result = buildStep(project, out, project.dist, sources)

    return result
dataset/ETHPy150Open joehewitt/devon/devon/make.py/build/original