Skip to content

Commit

Permalink
Tweak sphinx config for wheezy build
Browse files Browse the repository at this point in the history
Should now build (even with math support!) under Wheezy, although it
does involve loading a metric ton of javascript to support the math
stuff...
  • Loading branch information
waveform80 committed Feb 24, 2017
1 parent d9316be commit 7280e48
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Maintainer: Dave Jones <dave@waveform.org.uk>
Homepage: http://picamera.readthedocs.io/
Section: python
Priority: extra
Build-Depends: debhelper (>= 8), python-all (>= 2.7), python-setuptools, python3-all, python3-setuptools, python-docutils, python-sphinx (>= 1.0.7+dfsg-1~)
Build-Depends: debhelper (>= 8), python-all (>= 2.7), python-setuptools, python3-all, python3-setuptools, python-docutils, python-sphinx (>= 1.0.7+dfsg-1~), libjs-mathjax
Standards-Version: 3.9.3
X-Python-Version: >= 2.7
X-Python3-Version: >= 3.2
Expand Down Expand Up @@ -33,7 +33,7 @@ Description: Pure Python interface to the Raspberry Pi's camera module.
Package: python-picamera-docs
Architecture: all
Section: doc
Depends: ${sphinxdoc:Depends}, ${misc:Depends}
Depends: ${sphinxdoc:Depends}, ${misc:Depends}, libjs-mathjax
Description: Documentation for the Python interface to the RPi's camera module.
picamera is a library for working with the Raspberry Pi's camera module from
within Python without having to resort to subprocesses. The majority of the
Expand Down
2 changes: 2 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ override_dh_installdocs:
python setup.py build_sphinx -b html
dh_installdocs

override_dh_sphinxdoc:
dh_sphinxdoc -Xmathjax
15 changes: 10 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ def __getattr__(cls, name):

# -- General configuration ------------------------------------------------

needs_sphinx = '1.4.0'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx', 'sphinx.ext.imgmath']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx']
if on_rtd:
needs_sphinx = '1.4.0'
extensions.append('sphinx.ext.imgmath')
imgmath_image_format = 'svg'
tags.add('rtd')
else:
extensions.append('sphinx.ext.mathjax')
mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_HTML'

templates_path = ['_templates']
source_suffix = '.rst'
#source_encoding = 'utf-8-sig'
Expand All @@ -90,9 +98,6 @@ def __getattr__(cls, name):
pygments_style = 'sphinx'
#modindex_common_prefix = []
#keep_warnings = False
imgmath_image_format = 'svg'
if on_rtd:
tags.add('rtd')

# -- Autodoc configuration ------------------------------------------------

Expand Down

0 comments on commit 7280e48

Please sign in to comment.