Skip to content

Commit

Permalink
SIMP-348 Fix for :ref: issue with rst2pdf
Browse files Browse the repository at this point in the history
This is a workaround for the current issue with ref2pdf where a PDF is
not generated if there are :ref: tags in your code.

In this case, the :ref: tags are stripped from the RST files prior to
generating the PDF.

This should be corrected when the bug is fixed.

This also fixes the issue with RTD failing.

SIMP-348 #close #comment 5.1.X Fix

Change-Id: I5ca04a23fa71745e1ac2a87c367aec6331030417
  • Loading branch information
trevor-vaughan committed Sep 9, 2015
1 parent da954e8 commit ad2ae5c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/simp-doc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ BuildRequires: python27
%endif
BuildRequires: python-pip
BuildRequires: python-virtualenv
BuildRequires: fontconfig
BuildRequires: dejavu-sans-fonts
BuildRequires: dejavu-sans-mono-fonts
BuildRequires: dejavu-serif-fonts
BuildRequires: dejavu-fonts-common
BuildRequires: libjpeg-devel
BuildRequires: zlib-devel

%description
Documentation for SIMP %{version}-%{release}
Expand All @@ -45,9 +52,16 @@ virtualenv venv
source venv/bin/activate
pip install --upgrade sphinx
pip install --upgrade rst2pdf
pip install --upgrade pillow
pip install --upgrade svglib

sphinx-build -E -n -t simp_%{simp_major_version} -b html -d sphinx_cache docs html
sphinx-build -E -n -t simp_%{simp_major_version} -b singlehtml -d sphinx_cache docs html-single

# Rst2pdf is currently broken on references so we have to remove them.
# This should be removed when this bug is fixed.
find docs -name "*.rst" -exec sed -i 's/:ref://g' {} \;

sphinx-build -E -n -t simp_%{simp_major_version} -b pdf -d sphinx_cache docs pdf

if [ ! -d changelogs ]; then
Expand Down
15 changes: 15 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
Babel==2.0
Jinja2==2.8
MarkupSafe==0.23
Pillow==2.9.0
Pygments==2.0.2
Sphinx==1.3.1
alabaster==0.7.6
docutils==0.12
pdfrw==0.2
pytz==2015.4
reportlab==3.2.0
rst2pdf==0.93
six==1.9.0
snowballstemmer==1.2.0
sphinx-rtd-theme==0.1.8
svglib==0.6.3

0 comments on commit ad2ae5c

Please sign in to comment.