berhoel.sphinx_settings package¶
Sphinx configuration for documentation for berhoel
python packages.
- class berhoel.sphinx_settings.ProjectTypes(value)[source]¶
Bases:
Enum
An enumeration.
- POETRY = 1¶
- CMAKE = 2¶
- class berhoel.sphinx_settings.PyProject_toml(cfg_file: Optional[Union[Path, str]] = None)[source]¶
Bases:
_ProjectInfo
Provide project information from pyproject.toml file.
- __init__(cfg_file: Optional[Union[Path, str]] = None)[source]¶
Process pyproject.toml file for project information.
- Parameters
cfg_file (str|Path) – path to pyproject.toml file for current project. (default: search for appropriate file)
- property project¶
- property release¶
- property author¶
- property html_baseurl¶
- class berhoel.sphinx_settings.CMakeLists_txt(cfg_file: Optional[Union[Path, str]] = None)[source]¶
Bases:
_ProjectInfo
Provide project information from CMakeLists.txt file.
- __init__(cfg_file: Optional[Union[Path, str]] = None)[source]¶
Process CMakeLists.txt file for project information.
- Parameters
cfg_file (str|Path) – path to CMakeLists.txt file for current project. (default: search for appropriate file)
- property project¶
- property release¶
- property author¶
- berhoel.sphinx_settings.configuration(project_type: ProjectTypes = ProjectTypes.POETRY, cfg_file: Optional[Union[Path, str]] = None)[source]¶
Get configuration class appropriate to build system for current project.
- Parameters
project_type – Type of builkd system configuration file (poetry or CMake) (default project_types.POETRY)
cfg_file – Path to build system configuration file. Will be search if not given. (default None)