aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2020-07-24 11:43:01 -0400
committerJake Hunsaker <jhunsake@redhat.com>2020-08-17 11:41:52 -0400
commitbef0ac86d830993c5599fd8d55d86685187ee8c1 (patch)
treed659da7d8d947ecb4fc526f3edf0b173545c09a7 /setup.py
parentee35c914fc46ff924af95528f005e2a3c61aaa62 (diff)
downloadsos-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.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 85d426ba..7138d324 100644
--- a/setup.py
+++ b/setup.py
@@ -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 :