Beispiel #1
0
def setup(app):
    from mozbuild.virtualenv import VirtualenvManager
    from moztreedocs import manager

    app.add_directive("mozbuildsymbols", MozbuildSymbols)

    # Unlike typical Sphinx installs, our documentation is assembled from
    # many sources and staged in a common location. This arguably isn't a best
    # practice, but it was the easiest to implement at the time.
    #
    # Here, we invoke our custom code for staging/generating all our
    # documentation.
    manager.generate_docs(app)
    app.srcdir = manager.staging_dir

    # We need to adjust sys.path in order for Python API docs to get generated
    # properly. We leverage the in-tree virtualenv for this.
    topsrcdir = manager.topsrcdir
    ve = VirtualenvManager(
        topsrcdir,
        os.path.join(app.outdir, "_venv"),
        sys.stderr,
        os.path.join(topsrcdir, "build", "build_virtualenv_packages.txt"),
    )
    ve.ensure()
    ve.activate()
Beispiel #2
0
def setup(app):
    app.add_directive('mozbuildsymbols', MozbuildSymbols)

    # Unlike typical Sphinx installs, our documentation is assembled from
    # many sources and staged in a common location. This arguably isn't a best
    # practice, but it was the easiest to implement at the time.
    #
    # Here, we invoke our custom code for staging/generating all our
    # documentation.
    from moztreedocs import SphinxManager

    topsrcdir = app.config._raw_config['topsrcdir']
    manager = SphinxManager(topsrcdir, os.path.join(topsrcdir, 'tools',
                                                    'docs'), app.outdir)
    manager.generate_docs(app)

    app.srcdir = os.path.join(app.outdir, '_staging')

    # We need to adjust sys.path in order for Python API docs to get generated
    # properly. We leverage the in-tree virtualenv for this.
    from mozbuild.virtualenv import VirtualenvManager

    ve = VirtualenvManager(
        topsrcdir, os.path.join(topsrcdir, 'dummy-objdir'),
        os.path.join(app.outdir, '_venv'), sys.stderr,
        os.path.join(topsrcdir, 'build', 'virtualenv_packages.txt'))
    ve.ensure()
    ve.activate()
Beispiel #3
0
def setup(app):
    app.add_directive('mozbuildsymbols', MozbuildSymbols)

    # Unlike typical Sphinx installs, our documentation is assembled from
    # many sources and staged in a common location. This arguably isn't a best
    # practice, but it was the easiest to implement at the time.
    #
    # Here, we invoke our custom code for staging/generating all our
    # documentation.
    from moztreedocs import SphinxManager

    topsrcdir = app.config._raw_config['topsrcdir']
    manager = SphinxManager(topsrcdir,
        os.path.join(topsrcdir, 'tools', 'docs'),
        app.outdir)
    manager.generate_docs(app)

    app.srcdir = os.path.join(app.outdir, '_staging')

    # We need to adjust sys.path in order for Python API docs to get generated
    # properly. We leverage the in-tree virtualenv for this.
    from mozbuild.virtualenv import VirtualenvManager

    ve = VirtualenvManager(topsrcdir,
        os.path.join(topsrcdir, 'dummy-objdir'),
        os.path.join(app.outdir, '_venv'),
        sys.stderr,
        os.path.join(topsrcdir, 'build', 'virtualenv_packages.txt'))
    ve.ensure()
    ve.activate()