|
13 | 13 | import sys |
14 | 14 | import os |
15 | 15 | sys.path.insert(0, os.path.abspath('../..')) |
| 16 | +sys.path.insert(0, os.path.abspath('../../src')) |
16 | 17 |
|
17 | 18 |
|
18 | 19 | # -- Project information ----------------------------------------------------- |
19 | 20 |
|
20 | 21 | project = 'PDFmorph' |
| 22 | +project_full = 'diffpy.pdfmorph' |
21 | 23 | copyright = '2009-2019, Trustees of Columbia University in the City of New York, all rights reserved.' |
22 | 24 | author = 'Chris Farrow, Christopher J. Wright, Pavol Juhás, Chia-Hao (Timothy) Liu, S. Matthew Román, Simon J.L. Billinge' |
23 | 25 |
|
24 | 26 | # The full version, including alpha/beta/rc tags |
25 | | -release = '0.1.0' |
| 27 | +from importlib.metadata import version |
| 28 | +fullversion = version(project_full) |
| 29 | +# The short X.Y version. |
| 30 | +version = ''.join(fullversion.split('.post')[:1]) |
| 31 | +# The full version, including alpha/beta/rc tags. |
| 32 | +release = fullversion |
| 33 | + |
| 34 | +# Get current date for copyright |
| 35 | +import time |
| 36 | +today = time.strftime('%B %d, %Y', time.localtime()) |
| 37 | +year = today.split()[-1] |
| 38 | +copyright = copyright.replace('%Y', year) |
26 | 39 |
|
27 | 40 |
|
28 | 41 | # -- General configuration --------------------------------------------------- |
29 | 42 |
|
30 | 43 | # Add any Sphinx extension module names here, as strings. They can be |
31 | 44 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
32 | 45 | # ones. |
33 | | -import sphinx_rtd_theme |
34 | | -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', |
35 | | - 'sphinx.ext.todo', 'sphinx.ext.viewcode', |
36 | | - 'sphinx.ext.intersphinx', 'm2r'] |
| 46 | +extensions = ['sphinx.ext.autodoc', |
| 47 | + 'sphinx.ext.napoleon', |
| 48 | + 'sphinx.ext.todo', |
| 49 | + 'sphinx.ext.viewcode', |
| 50 | + 'sphinx.ext.intersphinx', |
| 51 | + 'sphinx_rtd_theme', |
| 52 | + 'm2r', |
| 53 | +] |
37 | 54 | napoleon_google_docstring = False |
38 | 55 | napoleon_use_param = False |
39 | 56 | napoleon_use_ivar = False |
|
61 | 78 |
|
62 | 79 | # The theme to use for HTML and HTML Help pages. See the documentation for |
63 | 80 | # a list of builtin themes. |
| 81 | +import sphinx_rtd_theme |
64 | 82 | html_theme = 'sphinx_rtd_theme' |
65 | 83 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
66 | 84 |
|
|
0 commit comments