|
22 | 22 |
|
23 | 23 | # Add any Sphinx extension module names here, as strings. They can be extensions |
24 | 24 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
25 | | -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', |
26 | | - 'sphinx.ext.todo', 'sphinx.ext.coverage', |
27 | | - #'sphinx.ext.napoleon', |
28 | | - #'sphinx.ext.imgmath', |
29 | | - 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', |
30 | | - 'sphinxcontrib.spelling'] |
| 25 | +extensions = [ |
| 26 | + 'sphinx.ext.autodoc', |
| 27 | + 'sphinx.ext.doctest', |
| 28 | + 'sphinx.ext.intersphinx', |
| 29 | + 'sphinx.ext.todo', |
| 30 | + 'sphinx.ext.coverage', |
| 31 | + #'sphinx.ext.napoleon', |
| 32 | + #'sphinx.ext.imgmath', |
| 33 | + 'sphinx.ext.ifconfig', |
| 34 | + 'sphinx.ext.viewcode', |
| 35 | + 'sphinxcontrib.spelling' |
| 36 | +] |
31 | 37 |
|
32 | 38 | # Add any paths that contain templates here, relative to this directory. |
33 | 39 | templates_path = ['_templates'] |
|
43 | 49 |
|
44 | 50 | # General information about the project. |
45 | 51 | project = u'Python Wrapper for GnuPG' |
46 | | -copyright = u'2008-%s, Vinay Sajip' % datetime.date.today().year |
| 52 | +copyright = u'2008-%s, Vinay Sajip' % datetime.date.today().year |
47 | 53 |
|
48 | 54 | # The version info for the project you're documenting, acts as replacement for |
49 | 55 | # |version| and |release|, also used in various other places throughout the |
50 | 56 | # built documents. |
51 | 57 | # |
52 | 58 | sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) |
53 | | -from gnupg import __version__ as release, __date__ as today |
| 59 | +from gnupg import __version__ as release # , __date__ as today |
| 60 | + |
54 | 61 | version = '.'.join(release.split('.')[:2]) |
55 | 62 | if '.dev' in release: |
56 | 63 | today = datetime.date.today().strftime('%b %d, %Y') |
|
92 | 99 | # A list of ignored prefixes for module index sorting. |
93 | 100 | #modindex_common_prefix = [] |
94 | 101 |
|
95 | | -spelling_lang='en_GB' |
96 | | -spelling_word_list_filename='spelling_wordlist.txt' |
| 102 | +spelling_lang = 'en_GB' |
| 103 | +spelling_word_list_filename = 'spelling_wordlist.txt' |
97 | 104 |
|
98 | 105 | # -- Options for HTML output --------------------------------------------------- |
99 | 106 |
|
100 | 107 | # The theme to use for HTML and HTML Help pages. See the documentation for |
101 | 108 | # a list of builtin themes. |
102 | 109 | html_theme = os.environ.get('DOCS_THEME', 'default') |
103 | 110 |
|
104 | | -THEME_OPTIONS = { |
105 | | - 'sizzle': { |
106 | | - } |
107 | | -} |
| 111 | +THEME_OPTIONS = {'sizzle': {}} |
108 | 112 |
|
109 | 113 | if html_theme == 'sizzle' and os.path.isfile('hover.json'): |
110 | 114 | import json |
111 | 115 |
|
112 | 116 | with open('hover.json', encoding='utf-8') as f: |
113 | | - THEME_OPTIONS['sizzle']['custom_data'] = {'hovers': json.load(f) } |
| 117 | + THEME_OPTIONS['sizzle']['custom_data'] = {'hovers': json.load(f)} |
114 | 118 |
|
115 | 119 | # Theme options are theme-specific and customize the look and feel of a theme |
116 | 120 | # further. For a list of options available for each theme, see the |
|
155 | 159 | # Custom sidebar templates, maps document names to template names. |
156 | 160 |
|
157 | 161 | # html_sidebars = { |
158 | | - # '**': [ |
159 | | - # 'localtoc.html', 'globaltoc.html', 'relations.html', |
160 | | - # 'sourcelink.html', 'searchbox.html' |
161 | | - # ], |
| 162 | +# '**': [ |
| 163 | +# 'localtoc.html', 'globaltoc.html', 'relations.html', |
| 164 | +# 'sourcelink.html', 'searchbox.html' |
| 165 | +# ], |
162 | 166 | # } |
163 | 167 |
|
164 | 168 | # Additional templates that should be rendered to pages, maps page names to |
165 | 169 | # template names. |
166 | 170 | #html_additional_pages = {} |
167 | 171 |
|
168 | 172 | # If false, no module index is generated. |
169 | | -#html_domain_indices = True |
| 173 | +# html_domain_indices = True |
170 | 174 |
|
171 | 175 | # If false, no index is generated. |
172 | 176 | #html_use_index = True |
|
194 | 198 | # Output file base name for HTML help builder. |
195 | 199 | htmlhelp_basename = 'GnuPGWrapperforPythondoc' |
196 | 200 |
|
197 | | - |
198 | 201 | # -- Options for LaTeX output -------------------------------------------------- |
199 | 202 |
|
200 | 203 | # The paper size ('letter' or 'a4'). |
|
206 | 209 | # Grouping the document tree into LaTeX files. List of tuples |
207 | 210 | # (source start file, target name, title, author, documentclass [howto/manual]). |
208 | 211 | latex_documents = [ |
209 | | - ('index', 'GnuPGWrapperforPython.tex', u'GnuPG Wrapper for Python Documentation', |
210 | | - u'Vinay Sajip', 'manual'), |
| 212 | + ('index', 'GnuPGWrapperforPython.tex', u'GnuPG Wrapper for Python Documentation', u'Vinay Sajip', 'manual'), |
211 | 213 | ] |
212 | 214 |
|
213 | 215 | # The name of an image file (relative to this directory) to place at the top of |
|
233 | 235 | # If false, no module index is generated. |
234 | 236 | #latex_domain_indices = True |
235 | 237 |
|
236 | | - |
237 | 238 | # -- Options for manual page output -------------------------------------------- |
238 | 239 |
|
239 | 240 | # One entry per manual page. List of tuples |
240 | 241 | # (source start file, name, description, authors, manual section). |
241 | | -man_pages = [ |
242 | | - ('index', 'python-gnupg', u'python-gnupg Documentation', |
243 | | - [u'Vinay Sajip'], 1) |
244 | | -] |
245 | | - |
| 242 | +man_pages = [('index', 'python-gnupg', u'python-gnupg Documentation', [u'Vinay Sajip'], 1)] |
246 | 243 |
|
247 | 244 | # -- Options for Epub output --------------------------------------------------- |
248 | 245 |
|
|
283 | 280 | # Allow duplicate toc entries. |
284 | 281 | #epub_tocdup = True |
285 | 282 |
|
286 | | - |
287 | 283 | # Example configuration for intersphinx: refer to the Python standard library. |
288 | 284 | intersphinx_mapping = {'python': ('http://docs.python.org/', None)} |
289 | 285 |
|
| 286 | + |
290 | 287 | def skip_module_docstring(app, what, name, obj, options, lines): |
291 | 288 | if (what, name) == ('module', 'distlib'): |
292 | 289 | del lines[:] |
293 | 290 |
|
| 291 | + |
294 | 292 | def setup(app): |
295 | 293 | app.connect('autodoc-process-docstring', skip_module_docstring) |
0 commit comments