diff --git a/doc/requirements.txt b/doc/requirements.txt index d3f782bbd..3842af28b 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,3 +7,4 @@ docutils>=0.11 # OSI-Approved Open Source, Public Domain openstackdocstheme>=1.18.1 # Apache-2.0 beautifulsoup4>=4.6.0 # MIT reno>=2.5.0 # Apache-2.0 +sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 99bea4c56..865b9a6bd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,6 +27,7 @@ sys.path.insert(0, os.path.abspath('.')) extensions = [ 'sphinx.ext.autodoc', 'openstackdocstheme', + 'sphinxcontrib.rsvgconverter', 'enforcer' ] @@ -107,13 +108,16 @@ htmlhelp_basename = '%sdoc' % project # [howto/manual]). latex_documents = [ ('index', - '%s.tex' % project, - u'%s Documentation' % project, + 'doc-openstacksdk.tex', + u'OpenStackSDK Documentation', u'OpenStack Foundation', 'manual'), ] # Allow deeper levels of nesting for \begin...\end stanzas latex_elements = {'maxlistdepth': 10} +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False + # Include both the class and __init__ docstrings when describing the class autoclass_content = "both" diff --git a/tox.ini b/tox.ini index 5322f1012..b4ece8ba7 100644 --- a/tox.ini +++ b/tox.ini @@ -81,7 +81,16 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt -commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html +commands = + sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html + +[testenv:pdf-docs] +deps = {[testenv:docs]deps} +whitelist_externals = + make +commands = + sphinx-build -W -d doc/build/doctrees -b latex doc/source/ doc/build/pdf + make -C doc/build/pdf [testenv:releasenotes] deps =