Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 984e9b0

Browse files
authored
Merge pull request #7569 from QuLogic/fix-sphinx-1.5
DOC: Disable build against Sphinx 1.5.0
2 parents fac3e68 + 63656a4 commit 984e9b0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

doc-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Install the documentation requirements with:
77
# pip install -r doc-requirements.txt
88
#
9-
sphinx>1.0
9+
sphinx>1.0,!=1.5.0
1010
numpydoc
1111
ipython
1212
mock

doc/conf.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@
241241
# The paper size ('letter' or 'a4').
242242
latex_paper_size = 'letter'
243243

244-
# The font size ('10pt', '11pt' or '12pt').
245-
latex_font_size = '11pt'
246-
247244
# Grouping the document tree into LaTeX files. List of tuples
248245
# (source start file, target name, title, author, document class [howto/manual]).
249246

@@ -258,8 +255,9 @@
258255
# the title page.
259256
latex_logo = None
260257

258+
latex_elements = {}
261259
# Additional stuff for the LaTeX preamble.
262-
latex_preamble = r"""
260+
latex_elements['preamble'] = r"""
263261
% In the parameters section, place a newline after the Parameters
264262
% header. (This is stolen directly from Numpy's conf.py, since it
265263
% affects Numpy-style docstrings).
@@ -279,14 +277,18 @@
279277
\usepackage{enumitem}
280278
\setlistdepth{2048}
281279
"""
280+
latex_elements['pointsize'] = '11pt'
282281

283282
# Documents to append as an appendix to all manuals.
284283
latex_appendices = []
285284

286285
# If false, no module index is generated.
287286
latex_use_modindex = True
288287

289-
latex_use_parts = True
288+
if hasattr(sphinx, 'version_info') and sphinx.version_info[:2] >= (1, 4):
289+
latex_toplevel_sectioning = 'part'
290+
else:
291+
latex_use_parts = True
290292

291293
# Show both class-level docstring and __init__ docstring in class
292294
# documentation

0 commit comments

Comments
 (0)