diff --git a/bindep.txt b/bindep.txt index b4c6bd07e..832f1f612 100644 --- a/bindep.txt +++ b/bindep.txt @@ -14,3 +14,29 @@ libxslt1-dev [platform:dpkg] libssl-dev [platform:dpkg] openssl-devel [platform:rpm !platform:suse] libopenssl-devel [platform:suse !platform:rpm] + +# Binary dependencies for PDF doc generation +fonts-liberation [doc platform:dpkg] +texlive-latex-base [doc platform:dpkg] +texlive-latex-extra [doc platform:dpkg] +texlive-xetex [doc platform:dpkg] +texlive-fonts-recommended [doc platform:dpkg] +xindy [doc platform:dpkg] +latexmk [doc platform:dpkg] +texlive [doc platform:rpm] +texlive-fncychap [doc platform:rpm] +texlive-titlesec [doc platform:rpm] +texlive-tabulary [doc platform:rpm] +texlive-framed [doc platform:rpm] +texlive-wrapfig [doc platform:rpm] +texlive-upquote [doc platform:rpm] +texlive-capt-of [doc platform:rpm] +texlive-needspace [doc platform:rpm] +texlive-polyglossia [doc platform:rpm] +texlive-xetex [doc platform:rpm] +texlive-xindy [doc platform:rpm] +texlive-courier [doc platform:rpm] +latexmk [doc platform:rpm] +python3-sphinxcontrib-svg2pdfconverter-common [doc platform:rpm] +librsvg2-tools [doc platform:rpm] +librsvg2-bin [doc platform:dpkg] diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 000000000..153365e86 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,11 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +openstackdocstheme>=1.20.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,>=1.6.3,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.3;python_version>='3.4' # BSD +os-api-ref>=1.4.0 # Apache-2.0 +sphinxcontrib-apidoc>=0.2.0 # BSD +sphinx-feature-classification>=0.1.0 # Apache 2.0 +mock>=2.0.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 7a65501e0..1caa3c6a5 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -53,3 +53,49 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M' repository_name = 'openstack/os-brick' bug_project = 'os-brick' bug_tag = '' + +# -- Options for LaTeX output ------------------------------------------------- + +# The paper size ('letter' or 'a4'). +# latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +# latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', 'os-brick.tex', u'OS Brick Documentation', + 'Cinder Contributors', 'manual') +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +# latex_preamble = '' + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_use_modindex = True + +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False + +latex_domain_indices = False + +latex_elements = { + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', +} + +latex_additional_files = ['os_brick.sty'] diff --git a/tox.ini b/tox.ini index bf6a525b3..5d7c52581 100644 --- a/tox.ini +++ b/tox.ini @@ -73,7 +73,23 @@ commands = [testenv:docs] basepython = python3 -commands = python setup.py build_sphinx +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt +commands = + rm -fr doc/build doc/source/contributor/api/ .autogenerated + sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html +whitelist_externals = rm + + +[testenv:pdf-docs] +basepython = python3 +deps = {[testenv:docs]deps} +commands = {[testenv:docs]commands} + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf +whitelist_externals = + make [testenv:releasenotes] basepython = python3