]> granicus.if.org Git - python/commitdiff
Fix some sphinx warnings (#9) (#82)
authorMariatta <Mariatta@users.noreply.github.com>
Tue, 14 Feb 2017 14:12:15 +0000 (06:12 -0800)
committerGitHub <noreply@github.com>
Tue, 14 Feb 2017 14:12:15 +0000 (06:12 -0800)
* Fix some deprecation warnings in Doc/conf.py
* Fix an rst error in Misc/NEWS

Contributed by Ryan Gonzalez @kirbyfan64

(cherry picked from commit e7ffb99f842ebff97cffa0fc90b18be4e5abecf2)

Doc/Makefile
Doc/conf.py

index 10c3288c590fd9e35a94d9d730a9fadf7f8f2087..9ad7b86579d66ca3a3213ee7c04e45db7aaa7452 100644 (file)
@@ -10,7 +10,7 @@ PAPER        =
 SOURCES      =
 DISTVERSION  = $(shell $(PYTHON) tools/extensions/patchlevel.py)
 
-ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
+ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_elements.papersize=$(PAPER) \
                 $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES)
 
 .PHONY: help build html htmlhelp latex text changes linkcheck \
index b1bb6208bb4b8e6d6c0b1d5b72f697c767ac7e7b..b3f26d5a692163abefccfc842d4480ec21596595 100644 (file)
@@ -88,11 +88,24 @@ html_split_index = True
 # Options for LaTeX output
 # ------------------------
 
+# Get LaTeX to handle Unicode correctly
+latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
+
+# Additional stuff for the LaTeX preamble.
+latex_elements['preamble'] = r'''
+\authoraddress{
+  \strong{Python Software Foundation}\\
+  Email: \email{docs@python.org}
+}
+\let\Verbatim=\OriginalVerbatim
+\let\endVerbatim=\endOriginalVerbatim
+'''
+
 # The paper size ('letter' or 'a4').
-latex_paper_size = 'a4'
+latex_elements['papersize'] = 'a4'
 
 # The font size ('10pt', '11pt' or '12pt').
-latex_font_size = '10pt'
+latex_elements['font_size'] = '10pt'
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, document class [howto/manual]).
@@ -125,22 +138,9 @@ latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex',
                        for fn in os.listdir('howto')
                        if fn.endswith('.rst') and fn != 'index.rst')
 
-# Additional stuff for the LaTeX preamble.
-latex_preamble = r'''
-\authoraddress{
-  \strong{Python Software Foundation}\\
-  Email: \email{docs@python.org}
-}
-\let\Verbatim=\OriginalVerbatim
-\let\endVerbatim=\endOriginalVerbatim
-'''
-
 # Documents to append as an appendix to all manuals.
 latex_appendices = ['glossary', 'about', 'license', 'copyright']
 
-# Get LaTeX to handle Unicode correctly
-latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
-
 # Options for Epub output
 # -----------------------