summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-11-27 04:06:49 -0800
committerSteve Piercy <web@stevepiercy.com>2018-11-27 04:06:49 -0800
commitd601938327025ab4dc83a722301eecac4a5ea32d (patch)
tree09d3363aca34989c2bc4e2772798b552dabad7f4
parentc308646ef40e456c6821e45b1d5620f72ccda13e (diff)
downloadpastedeploy-git-d601938327025ab4dc83a722301eecac4a5ea32d.tar.gz
Modernize conf.py so we don't have to keep updating it for each release and year
-rw-r--r--docs/conf.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/conf.py b/docs/conf.py
index c2c3191..d89e68b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,7 +11,8 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.
-import sys
+import datetime
+import pkg_resources
import pylons_sphinx_themes
# If your extensions are in another directory, add it here.
@@ -34,16 +35,18 @@ source_suffix = '.rst'
master_doc = 'index'
# General substitutions.
+thisyear = datetime.datetime.now().year
project = 'Paste Deploy'
-copyright = '2011, Ian Bicking and contributors'
+copyright = '2011-%s, Ian Bicking and contributors' % thisyear
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
-version = '1.5'
+version = pkg_resources.get_distribution('pastedeploy').version
+
# The full version, including alpha/beta/rc tags.
-release = '1.5.2'
+release = version
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: