|
14 | 14 |
|
15 | 15 | import sys
|
16 | 16 | import os
|
| 17 | +import os.path as osp |
| 18 | +import re |
| 19 | + |
| 20 | + |
| 21 | +VERSION_LINE_REGEX = re.compile(br''' |
| 22 | + ^ |
| 23 | + version |
| 24 | + \s* |
| 25 | + = |
| 26 | + \s* |
| 27 | + (?P<version_str> |
| 28 | + \S+ |
| 29 | + ) |
| 30 | + \s* |
| 31 | + $ |
| 32 | +''', re.VERBOSE) |
| 33 | + |
| 34 | + |
| 35 | +def get_version_str(): |
| 36 | + setup_cfg_path = osp.join(os.pardir, 'setup.cfg') |
| 37 | + with open(setup_cfg_path, 'rb') as f: |
| 38 | + for line in f: |
| 39 | + match = VERSION_LINE_REGEX.search(line) |
| 40 | + if match: |
| 41 | + return match.group('version_str').decode('utf-8') |
| 42 | + raise AssertionError('version not found') |
| 43 | + |
17 | 44 |
|
18 | 45 | # If extensions (or modules to document with autodoc) are in another directory,
|
19 | 46 | # add these directories to sys.path here. If the directory is relative to the
|
20 | 47 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
21 | 48 | #sys.path.insert(0, os.path.abspath('.'))
|
22 |
| -sys.path.insert(0, os.path.abspath('..')) |
| 49 | +sys.path.insert(0, os.path.abspath(os.pardir)) |
23 | 50 |
|
24 | 51 | # -- General configuration ------------------------------------------------
|
25 | 52 |
|
|
48 | 75 |
|
49 | 76 | # General information about the project.
|
50 | 77 | project = u'unittest_expander'
|
51 |
| -copyright = u'2014, Jan Kaliszewski (zuo)' |
| 78 | +copyright = u'2014-2021, Jan Kaliszewski (zuo) and others' |
52 | 79 |
|
53 | 80 | # The version info for the project you're documenting, acts as replacement for
|
54 | 81 | # |version| and |release|, also used in various other places throughout the
|
55 | 82 | # built documents.
|
56 | 83 | #
|
57 | 84 | # The full version, including alpha/beta/rc tags.
|
58 |
| -release = '0.3.9.dev7' |
| 85 | +release = get_version_str() |
59 | 86 | # The short X.Y version.
|
60 | 87 | version = '.'.join(release.split('.')[:2])
|
61 | 88 |
|
|
201 | 228 | # author, documentclass [howto, manual, or own class]).
|
202 | 229 | latex_documents = [
|
203 | 230 | ('index', 'unittest_expander.tex', u'unittest\\_expander Documentation',
|
204 |
| - u'Jan Kaliszewski (zuo)', 'manual'), |
| 231 | + u'Jan Kaliszewski (zuo) and others', 'manual'), |
205 | 232 | ]
|
206 | 233 |
|
207 | 234 | # The name of an image file (relative to this directory) to place at the top of
|
|
231 | 258 | # (source start file, name, description, authors, manual section).
|
232 | 259 | man_pages = [
|
233 | 260 | ('index', 'unittest_expander', u'unittest_expander Documentation',
|
234 |
| - [u'Jan Kaliszewski (zuo)'], 1) |
| 261 | + [u'Jan Kaliszewski (zuo) and others'], 1) |
235 | 262 | ]
|
236 | 263 |
|
237 | 264 | # If true, show URL addresses after external links.
|
|
245 | 272 | # dir menu entry, description, category)
|
246 | 273 | texinfo_documents = [
|
247 | 274 | ('index', 'unittest_expander', u'unittest_expander Documentation',
|
248 |
| - u'Jan Kaliszewski (zuo)', 'unittest_expander', |
249 |
| - 'One line description of project.', 'Miscellaneous'), |
| 275 | + u'Jan Kaliszewski (zuo) and others', 'unittest_expander', |
| 276 | + 'Easy and flexible unittest parameterization.', 'Miscellaneous'), |
250 | 277 | ]
|
251 | 278 |
|
252 | 279 | # Documents to append as an appendix to all manuals.
|
|
266 | 293 |
|
267 | 294 | # Bibliographic Dublin Core info.
|
268 | 295 | epub_title = u'unittest_expander'
|
269 |
| -epub_author = u'Jan Kaliszewski (zuo)' |
| 296 | +epub_author = u'Jan Kaliszewski (zuo) and others' |
270 | 297 | epub_publisher = u'Jan Kaliszewski (zuo)'
|
271 |
| -epub_copyright = u'2014, Jan Kaliszewski (zuo)' |
| 298 | +epub_copyright = u'2014-2021, Jan Kaliszewski (zuo) and others' |
272 | 299 |
|
273 | 300 | # The basename for the epub file. It defaults to the project name.
|
274 | 301 | #epub_basename = u'unittest_expander'
|
|
0 commit comments