Get docs version and copyright year dynamically

This commit is contained in:
Kenneth Lyons 2020-05-30 09:09:01 -07:00
parent 2a6f3f0193
commit 6c61e2445e

View File

@ -11,7 +11,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sys
import os
from datetime import datetime
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@ -19,6 +21,7 @@ import sys, os
path = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(path, '..', '..'))
sys.path.insert(0, os.path.join(path, '..', 'extensions'))
import pyqtgraph
# -- General configuration -----------------------------------------------------
@ -43,16 +46,16 @@ master_doc = 'index'
# General information about the project.
project = 'pyqtgraph'
copyright = '2011, Luke Campagnola'
copyright = '2011 - {}, Luke Campagnola'.format(datetime.now().year)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.10.0'
version = pyqtgraph.__version__
# The full version, including alpha/beta/rc tags.
release = '0.10.0'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.