示例#1
0
def finalize_sphinx_build(sconf, conf, app):
    target = sconf.builder
    logger.info('starting to finalize the Sphinx build {0}'.format(target))

    if target == 'linkcheck':
        task = app.add('task')
        task.job = printer
        task.args = '{0}: See {1}/{0}/output.txt for output.'.format(builder, conf.paths.branch_output)
    elif target == 'dirhtml':
        for job in (finalize_dirhtml_build, error_pages):
            task = app.add('task')
            task.job = job
            task.args = [sconf, conf]

        if conf.system.branched is True and conf.git.branches.current == 'master':
            link_task = app.add('task')
            link_task.job = create_manual_symlink
            link_task.args = [conf]
            link_task.description = "create the 'manual' symlink"
    elif target == 'epub':
        task = app.add('task')
        task.job = finalize_epub_build
        task.args = [target, conf]
        task.description = 'finalizing epub build'
    elif target == 'man':
        manpage_url_tasks(target, conf, app)
        task = app.add('task')
        task.job = man_tarball
        task.args = [target, conf]
        task.description = "creating tarball for manpages"
    elif target == 'html':
        task = app.add('task')
        task.job = html_tarball
        task.args = [sconf.name, conf]
        task.description = "creating tarball for html archive"
    elif target == 'slides':
        slide_tasks(sconf, conf, app)
    elif target == 'json':
        json_output_tasks(conf, app)
    elif target == 'singlehtml':
        finalize_single_html_tasks(target, conf, app)
    elif target == 'latex':
        pdf_tasks(sconf, conf, app)
    elif target == 'gettext':
        gettext_tasks(conf, app)
示例#2
0
def finalize_sphinx_build(sconf, conf, app):
    target = sconf.builder
    logger.info('starting to finalize the Sphinx build {0}'.format(target))

    if target == 'linkcheck':
        app.pool = 'serial'
        task = app.add('task')
        task.job = printer
        task.target = os.path.join(conf.paths.projectroot,
                                   conf.paths.branch_output, builder, 'output.txt')
        task.args = '{0}: See {1}/{0}/output.txt for output.'.format(builder, conf.paths.branch_output)
    elif target == 'dirhtml':
        app.pool = 'thread'
        for job in (finalize_dirhtml_build, error_pages):
            task = app.add('task')
            task.job = job
            task.target = os.path.join(conf.paths.projectroot, conf.paths.public_site_output)
            task.dependency = None
            task.args = [sconf, conf]

        if conf.system.branched is True and conf.git.branches.current == 'master':
            link_task = app.add('task')
            link_task.job = create_manual_symlink
            link_task.target = [ t[0] for t in get_public_links(conf) ]
            link_task.dependency = get_config_paths('integration',conf)
            link_task.dependency.append(os.path.join(conf.paths.projectroot,
                                                     conf.paths.public_site_output))
            link_task.args = [conf]
            link_task.description = "create the 'manual' symlink"
    elif target == 'epub':
        app.pool = 'serial'
        task = app.add('task')
        task.job = finalize_epub_build
        task.args = [target, conf]
        task.description = 'finalizing epub build'
    elif target == 'man':
        app.pool = 'thread'
        manpage_url_tasks(target, conf, app)
        task = app.add('task')
        task.job = man_tarball
        task.target = [get_tarball_name('man', conf),
                       get_tarball_name('link-man', conf)]
        task.args = [target, conf]
        task.description = "creating tarball for manpages"
    elif target == 'html':
        app.pool = 'serial'
        task = app.add('task')
        task.job = html_tarball
        task.target = [get_tarball_name('html', conf),
                       get_tarball_name('link-html', conf)]
        task.args = [sconf.name, conf]
        task.description = "creating tarball for html archive"
    elif target == 'slides':
        app.pool = 'thread'
        slide_tasks(sconf, conf, app)
    elif target == 'json':
        app.pool = 'thread'
        json_output_tasks(conf, app)
    elif target == 'singlehtml':
        app.pool = 'thread'
        finalize_single_html_tasks(target, conf, app)
    elif target == 'latex':
        app.pool = 'thread'
        pdf_tasks(sconf, conf, app)
    elif target == 'gettext':
        app.pool = 'thread'
        gettext_tasks(conf, app)
示例#3
0
def finalize_sphinx_build(sconf, conf, app):
    target = sconf.builder
    logger.info('starting to finalize the Sphinx build {0}'.format(target))

    if target == 'linkcheck':
        app.pool = 'serial'
        task = app.add('task')
        task.job = printer
        task.target = os.path.join(conf.paths.projectroot,
                                   conf.paths.branch_output, builder,
                                   'output.txt')
        task.args = '{0}: See {1}/{0}/output.txt for output.'.format(
            builder, conf.paths.branch_output)
    elif target == 'dirhtml':
        app.pool = 'thread'
        for job in (finalize_dirhtml_build, error_pages):
            task = app.add('task')
            task.job = job
            task.target = os.path.join(conf.paths.projectroot,
                                       conf.paths.public_site_output)
            task.dependency = None
            task.args = [sconf, conf]

        if conf.system.branched is True and conf.git.branches.current == 'master':
            link_task = app.add('task')
            link_task.job = create_manual_symlink
            link_task.target = [t[0] for t in get_public_links(conf)]
            link_task.dependency = get_config_paths('integration', conf)
            link_task.dependency.append(
                os.path.join(conf.paths.projectroot,
                             conf.paths.public_site_output))
            link_task.args = [conf]
            link_task.description = "create the 'manual' symlink"
    elif target == 'epub':
        app.pool = 'serial'
        task = app.add('task')
        task.job = finalize_epub_build
        task.args = [target, conf]
        task.description = 'finalizing epub build'
    elif target == 'man':
        app.pool = 'thread'
        manpage_url_tasks(target, conf, app)
        task = app.add('task')
        task.job = man_tarball
        task.target = [
            get_tarball_name('man', conf),
            get_tarball_name('link-man', conf)
        ]
        task.args = [target, conf]
        task.description = "creating tarball for manpages"
    elif target == 'html':
        app.pool = 'serial'
        task = app.add('task')
        task.job = html_tarball
        task.target = [
            get_tarball_name('html', conf),
            get_tarball_name('link-html', conf)
        ]
        task.args = [sconf.name, conf]
        task.description = "creating tarball for html archive"
    elif target == 'slides':
        app.pool = 'thread'
        slide_tasks(sconf, conf, app)
    elif target == 'json':
        app.pool = 'thread'
        json_output_tasks(conf, app)
    elif target == 'singlehtml':
        app.pool = 'thread'
        finalize_single_html_tasks(target, conf, app)
    elif target == 'latex':
        app.pool = 'thread'
        pdf_tasks(sconf, conf, app)
    elif target == 'gettext':
        app.pool = 'thread'
        gettext_tasks(conf, app)