|
16 | 16 |
|
17 | 17 | from tmuxp import __version__ |
18 | 18 |
|
19 | | -sys.path.append(os.path.abspath('.')) |
20 | | -sys.path.append(os.path.abspath('_themes')) |
| 19 | +# Get the project root dir, which is the parent dir of this |
| 20 | +cwd = os.getcwd() |
| 21 | +project_root = os.path.dirname(cwd) |
| 22 | + |
| 23 | +# Insert the project root dir as the first element in the PYTHONPATH. |
| 24 | +# This lets us ensure that the source package is imported, and that its |
| 25 | +# version is used. |
| 26 | +sys.path.insert(0, project_root) |
| 27 | +from ..package_metadata import p |
21 | 28 |
|
22 | 29 | # If extensions (or modules to document with autodoc) are in another directory, |
23 | 30 | # add these directories to sys.path here. If the directory is relative to the |
|
52 | 59 | master_doc = 'index' |
53 | 60 |
|
54 | 61 | # General information about the project. |
55 | | -project = u'tmuxp' |
56 | | -copyright = u'2013, Tony Narlock' |
| 62 | +project = p.title |
| 63 | +copyright = p.copyright |
57 | 64 |
|
58 | 65 | rst_prolog = """ |
59 | 66 | .. note:: |
|
70 | 77 | # built documents. |
71 | 78 | # |
72 | 79 | # The short X.Y version. |
73 | | -version = __version__ |
| 80 | +version = '%s' % ('.'.join(p.version.split('.'))[:2]) |
74 | 81 | # The full version, including alpha/beta/rc tags. |
75 | | -release = __version__ |
| 82 | +release = '%s' % (p.version) |
76 | 83 |
|
77 | 84 | # The language for content autogenerated by Sphinx. Refer to documentation |
78 | 85 | # for a list of supported languages. |
|
196 | 203 | #html_file_suffix = None |
197 | 204 |
|
198 | 205 | # Output file base name for HTML help builder. |
199 | | -htmlhelp_basename = 'tmuxpdoc' |
200 | | - |
| 206 | +htmlhelp_basename = '%sdoc' % p.title |
201 | 207 |
|
202 | 208 | # -- Options for LaTeX output -------------------------------------------------- |
203 | 209 |
|
|
215 | 221 | # Grouping the document tree into LaTeX files. List of tuples |
216 | 222 | # (source start file, target name, title, author, documentclass [howto/manual]). |
217 | 223 | latex_documents = [ |
218 | | - ('index', 'tmuxp.tex', u'tmuxp Documentation', |
219 | | - u'Tony Narlock', 'manual'), |
| 224 | + ('index', '{0}.tex'.format(p.package_name), '{0} Documentation'.format(p.title), |
| 225 | + p.author, 'manual'), |
220 | 226 | ] |
221 | 227 |
|
222 | 228 | # The name of an image file (relative to this directory) to place at the top of |
|
245 | 251 | # One entry per manual page. List of tuples |
246 | 252 | # (source start file, name, description, authors, manual section). |
247 | 253 | man_pages = [ |
248 | | - ('index', 'tmuxp', u'tmuxp Documentation', |
249 | | - [u'Tony Narlock'], 1) |
| 254 | + ('index', p.package_name, '{0} Documentation'.format(p.title), |
| 255 | + p.author, 1), |
250 | 256 | ] |
251 | 257 |
|
252 | 258 | # If true, show URL addresses after external links. |
|
259 | 265 | # (source start file, target name, title, author, |
260 | 266 | # dir menu entry, description, category) |
261 | 267 | texinfo_documents = [ |
262 | | - ('index', 'tmuxp', u'tmuxp Documentation', |
263 | | - u'Tony Narlock', 'tmuxp', 'tmuxp', |
264 | | - 'Miscellaneous'), |
| 268 | + ('index', '{0}'.format(p.package_name), '{0} Documentation'.format(p.title), |
| 269 | + p.author, p.package_name, p.description, 'Miscellaneous'), |
265 | 270 | ] |
266 | 271 |
|
267 | 272 | # Documents to append as an appendix to all manuals. |
|
273 | 278 | # How to display URL addresses: 'footnote', 'no', or 'inline'. |
274 | 279 | #texinfo_show_urls = 'footnote' |
275 | 280 |
|
| 281 | +# If true, do not generate a @detailmenu in the "Top" node's menu. |
| 282 | +#texinfo_no_detailmenu = False |
276 | 283 |
|
277 | 284 | # Example configuration for intersphinx: refer to the Python standard library. |
278 | 285 | intersphinx_mapping = {'http://docs.python.org/': None} |
|
284 | 291 | scale=.75, |
285 | 292 | aspect=0.5, |
286 | 293 | proportional=True, |
287 | | - #linewidth=.5, |
288 | 294 | ) |
0 commit comments