diff --git a/bindep.txt b/bindep.txt index ed381a4785..871e2ad3e9 100644 --- a/bindep.txt +++ b/bindep.txt @@ -40,3 +40,7 @@ libsemanage-python [platform:redhat] gzip # Required to build language docs gettext + +# libsrvg2 is needed for sphinxcontrib-svg2pdfconverter in docs builds. +librsvg2-tools [doc platform:rpm] +librsvg2-bin [doc platform:dpkg] diff --git a/doc/requirements.txt b/doc/requirements.txt index e2415fbbc7..97552e0e19 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -4,7 +4,8 @@ # this is required for the docs build jobs sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +sphinx>=1.8.0,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD +sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD openstackdocstheme>=1.29.2 # Apache-2.0 reno>=2.11.3 # Apache-2.0 doc8>=0.8.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index cddc0af3e8..3373bcdfed 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -109,7 +109,8 @@ sys.path.insert(0, os.path.abspath('../../inventory/')) extensions = [ 'openstackdocstheme', 'sphinx.ext.autodoc', - 'sphinx.ext.extlinks' + 'sphinx.ext.extlinks', + 'sphinxcontrib.rsvgconverter' ] # Add any paths that contain templates here, relative to this directory. @@ -278,10 +279,12 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, target_name + '.tex', + (master_doc, 'doc-' + target_name + '.tex', title, author, 'manual'), ] +latex_use_xindy = False + # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None diff --git a/tox.ini b/tox.ini index bc7898fb4b..9ae4a00f54 100644 --- a/tox.ini +++ b/tox.ini @@ -41,7 +41,7 @@ setenv = [testenv:docs] basepython = python3 deps = -r{toxinidir}/doc/requirements.txt -commands= +commands = doc8 doc docstheme-build-translated.sh @@ -52,7 +52,14 @@ basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html - +[testenv:pdf-docs] +basepython = python3 +deps = {[testenv:docs]deps} +whitelist_externals = + make +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf [doc8] # Settings for doc8: