|
18 | 18 | import sphinx |
19 | 19 | from sphinx.errors import VersionRequirementError |
20 | 20 | import sphinx_rtd_theme |
| 21 | +import time |
| 22 | +import importlib.metadata |
| 23 | + |
21 | 24 |
|
22 | 25 | # If extensions (or modules to document with autodoc) are in another directory, |
23 | 26 | # add these directories to sys.path here. If the directory is relative to the |
24 | 27 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
25 | 28 | sys.path.insert(0, os.path.abspath('../..')) |
26 | | -import ezyrb.meta as meta |
| 29 | + |
| 30 | + |
| 31 | +# -- Project infirmation -------- |
| 32 | +_DISTRIBUTION_METADATA = importlib.metadata.metadata("ezyrb") |
| 33 | +project = _DISTRIBUTION_METADATA["Name"] |
| 34 | +copyright = f'2016-{time.strftime("%Y")}, EZyRB contributors' |
| 35 | +author = _DISTRIBUTION_METADATA["Author"] |
| 36 | + |
27 | 37 |
|
28 | 38 | # -- General configuration ------------------------------------------------ |
29 | 39 |
|
|
69 | 79 | # The master toctree document. |
70 | 80 | master_doc = 'index' |
71 | 81 |
|
72 | | -# General information about the project. |
73 | | -project = meta.__project__ |
74 | | -copyright = meta.__copyright__ |
75 | | -author = meta.__author__ |
76 | 82 |
|
77 | 83 | # autoclass |
78 | 84 | autoclass_content = 'both' |
|
82 | 88 | # built documents. |
83 | 89 | # |
84 | 90 | # The short X.Y version. |
85 | | -version = meta.__version__ |
86 | | -# The full version, including alpha/beta/rc tags. |
| 91 | +version = _DISTRIBUTION_METADATA["Version"] |
87 | 92 | release = version |
| 93 | +# The full version, including alpha/beta/rc tags. |
88 | 94 |
|
89 | 95 | # The language for content autogenerated by Sphinx. Refer to documentation |
90 | 96 | # for a list of supported languages. |
|
287 | 293 | # One entry per manual page. List of tuples |
288 | 294 | # (source start file, name, description, authors, manual section). |
289 | 295 | man_pages = [ |
290 | | - (master_doc, meta.__title__, u'EZyRB Documentation', |
| 296 | + (master_doc, 'ezyrb' , u'EZyRB Documentation', |
291 | 297 | [author], 1) |
292 | 298 | ] |
293 | 299 |
|
|
0 commit comments