diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-07-24 11:43:01 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-08-17 11:41:52 -0400 |
commit | bef0ac86d830993c5599fd8d55d86685187ee8c1 (patch) | |
tree | d659da7d8d947ecb4fc526f3edf0b173545c09a7 /setup.py | |
parent | ee35c914fc46ff924af95528f005e2a3c61aaa62 (diff) | |
download | sos-bef0ac86d830993c5599fd8d55d86685187ee8c1.tar.gz |
[docs] Update sphinx doc generation
Updates the sphinx configuration for 4.0 and extends the generated docs
to cover parsers and clusters. Updates the location of plugins to the
new structure.
Updates setup.py to include sphinx build configuration, as we are no
longer using make.
Closes: #1991
Resolves: #2172
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -58,6 +58,22 @@ class InstallData(install_data): return (out+".gz", _) return (out, _) +cmdclass = {'build': BuildData, 'install_data': InstallData} +command_options = {} +try: + from sphinx.setup_command import BuildDoc + cmdclass['build_sphinx'] = BuildDoc + command_options={ + 'build_sphinx': { + 'project': ('setup.py', 'sos'), + 'version': ('setup.py', VERSION), + 'source_dir': ('setup.py', 'docs') + } + } +except Exception: + print("Unable to build sphinx docs - module not present. Install sphinx " + "to enable documentation generation") + setup( name='sos', version=VERSION, @@ -84,9 +100,10 @@ setup( 'sos.collector', 'sos.collector.clusters', 'sos.cleaner', 'sos.cleaner.mappings', 'sos.cleaner.parsers' ], - cmdclass={'build': BuildData, 'install_data': InstallData}, + cmdclass=cmdclass, + command_options=command_options, requires=['pexpect'] - ) + ) # vim: set et ts=4 sw=4 : |