class documentation

class BuildDoc(Command):

View In Hierarchy

Distutils command to build Sphinx documentation.

The Sphinx build can then be triggered from distutils, and some Sphinx options can be set in setup.py or setup.cfg instead of Sphinx's own configuration file.

For instance, from setup.py:

# this is only necessary when not using setuptools/distribute
from sphinx.setup_command import BuildDoc
cmdclass = {'build_sphinx': BuildDoc}

name = 'My project'
version = '1.2'
release = '1.2.0'
setup(
    name=name,
    author='Bernard Montgomery',
    version=release,
    cmdclass=cmdclass,
    # these are optional and override conf.py settings
    command_options={
        'build_sphinx': {
            'project': ('setup.py', name),
            'version': ('setup.py', version),
            'release': ('setup.py', release)}},
)

Or add this section in setup.cfg:

[build_sphinx]
project = 'My project'
version = 1.2
release = 1.2.0
Method ​_guess​_source​_dir Undocumented
Method finalize​_options Undocumented
Method initialize​_options Undocumented
Method run Undocumented
Class Variable boolean​_options Undocumented
Class Variable description Undocumented
Class Variable user​_options Undocumented
Instance Variable all​_files Undocumented
Instance Variable build​_dir Undocumented
Instance Variable builder Undocumented
Instance Variable builder​_target​_dirs Undocumented
Instance Variable config​_dir Undocumented
Instance Variable copyright Undocumented
Instance Variable doctree​_dir Undocumented
Instance Variable fresh​_env Undocumented
Instance Variable keep​_going Undocumented
Instance Variable link​_index Undocumented
Instance Variable nitpicky Undocumented
Instance Variable pdb Undocumented
Instance Variable project Undocumented
Instance Variable release Undocumented
Instance Variable source​_dir Undocumented
Instance Variable today Undocumented
Instance Variable traceback Undocumented
Instance Variable verbosity Undocumented
Instance Variable version Undocumented
Instance Variable warning​_is​_error Undocumented
def _guess_source_dir(self):

Undocumented

Returns
strUndocumented
def finalize_options(self):

Undocumented

def initialize_options(self):

Undocumented

def run(self):

Undocumented

boolean_options: list[str] =

Undocumented

description: str =

Undocumented

user_options: list =

Undocumented

all_files: bool =

Undocumented

build_dir =

Undocumented

builder: str =

Undocumented

builder_target_dirs =

Undocumented

config_dir =

Undocumented

copyright: str =

Undocumented

doctree_dir =

Undocumented

fresh_env: bool =

Undocumented

keep_going: bool =

Undocumented

link_index: bool =

Undocumented

nitpicky: bool =

Undocumented

pdb: bool =

Undocumented

project: str =

Undocumented

release: str =

Undocumented

source_dir =

Undocumented

today: str =

Undocumented

traceback: bool =

Undocumented

verbosity =

Undocumented

version: str =

Undocumented

warning_is_error: bool =

Undocumented