diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-03-28 22:47:54 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-03-28 22:47:54 +0000 |
commit | ae002bbd014594ff41dd922641c69ac7559685a7 (patch) | |
tree | 13efcbe7df1e9d4484d48f835e5b17d8744821f1 /doc/source/conf.py | |
parent | 341e1e1a9180ca44f530b8878f66169263d38d47 (diff) | |
download | numpy-ae002bbd014594ff41dd922641c69ac7559685a7.tar.gz |
docs: use short X.Y version, and retaining any .dev suffixes
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r-- | doc/source/conf.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 27ff48a5f..70c65207b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -import sys, os +import sys, os, re # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -39,11 +39,11 @@ copyright = '2008-2009, The Scipy community' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # -import numpy.version -# The short X.Y version. -version = numpy.version.short_version +import numpy +# The short X.Y version (including .devXXXX, rcX, b1 suffixes if present) +version = re.sub(r'(\d+\.\d+)\.\d+(.*)', r'\1\2', numpy.__version__) # The full version, including alpha/beta/rc tags. -release = numpy.version.version +release = numpy.__version__ print version, release # There are two options for replacing |today|: either, you set today to some |