Skip to content

Commit 59ec558

Browse files
committed
update attribute in conf.py with pyproject
1 parent 2a89b06 commit 59ec558

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/source/conf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414

1515
import sys
1616
import os
17+
import datetime
1718
import shlex
1819
import sphinx
1920
from sphinx.errors import VersionRequirementError
2021
import sphinx_rtd_theme
22+
import importlib.metadata
23+
2124

2225
# If extensions (or modules to document with autodoc) are in another directory,
2326
# add these directories to sys.path here. If the directory is relative to the
@@ -26,6 +29,7 @@
2629
import pydmd
2730

2831
# -- General configuration ------------------------------------------------
32+
_DISTRIBUTION_METADATA = importlib.metadata.metadata('PyDMD')
2933

3034
# If your documentation needs a minimal Sphinx version, state it here.
3135
needs_sphinx = "1.4"
@@ -74,8 +78,9 @@
7478

7579
# General information about the project.
7680
project = "PyDMD"
77-
copyright = pydmd.__copyright__
78-
author = pydmd.__author__
81+
current_year = datetime.datetime.now().year
82+
copyright = f"2017-{current_year}, PyDMD Contributors"
83+
author = _DISTRIBUTION_METADATA['Author']
7984

8085
# autoclass
8186
autoclass_content = "both"
@@ -85,7 +90,7 @@
8590
# built documents.
8691
#
8792
# The short X.Y version.
88-
version = pydmd.__version__
93+
version = _DISTRIBUTION_METADATA['Version']
8994
# The full version, including alpha/beta/rc tags.
9095
release = version
9196

@@ -311,7 +316,6 @@
311316
"pydmd Documentation",
312317
author,
313318
"pydmd",
314-
"One line description of project.",
315319
"Miscellaneous",
316320
),
317321
]

0 commit comments

Comments
 (0)