diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-18 14:29:55 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-18 14:33:21 -0800 |
commit | e67655c31a9d98a65b3c9cd43ca329d8b97ba95b (patch) | |
tree | 54b4f4277915ba22462db88c8b456d72e0642705 /lib | |
parent | c7b8a4e25cde8c2f32e514fdfe5280feca42e4ea (diff) | |
download | spack-e67655c31a9d98a65b3c9cd43ca329d8b97ba95b.tar.gz spack-e67655c31a9d98a65b3c9cd43ca329d8b97ba95b.tar.bz2 spack-e67655c31a9d98a65b3c9cd43ca329d8b97ba95b.tar.xz spack-e67655c31a9d98a65b3c9cd43ca329d8b97ba95b.zip |
docs autodetect version.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/docs/conf.py | 14 | ||||
-rw-r--r-- | lib/spack/spack/__init__.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/cmd/package-list.py | 9 |
3 files changed, 16 insertions, 9 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index b4d49c594d..b01f33d4b8 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -35,7 +35,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import sys +import os +import subprocess # 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 @@ -43,9 +45,13 @@ import sys, os sys.path.insert(0, os.path.abspath('exts')) # Add the Spack bin directory to the path so that we can use its output in docs. -os.environ['SPACK_ROOT'] = '../../..' +spack_root = '../../..' +os.environ['SPACK_ROOT'] = spack_root os.environ['PATH'] += os.pathsep + '$SPACK_ROOT/bin' +spack_version = subprocess.Popen( + ['spack', '-V'], stderr=subprocess.PIPE).communicate()[1].strip().split('.') + # Set an environment variable so that colify will print output like it would to # a terminal. os.environ['COLIFY_TTY'] = 'true' @@ -97,9 +103,9 @@ copyright = u'2013-2014, Lawrence Livermore National Laboratory' # built documents. # # The short X.Y version. -version = '1.0' +version = '.'.join(spack_version[:2]) # The full version, including alpha/beta/rc tags. -release = '1.0' +release = '.'.join(spack_version[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 6763411f7d..eb891e3d57 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -78,7 +78,7 @@ concretizer = DefaultConcretizer() # Version information from spack.version import Version -spack_version = Version("0.8") +spack_version = Version("0.8.15") # # Executables used by Spack diff --git a/lib/spack/spack/cmd/package-list.py b/lib/spack/spack/cmd/package-list.py index 87c528881e..809c64a5b9 100644 --- a/lib/spack/spack/cmd/package-list.py +++ b/lib/spack/spack/cmd/package-list.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import re +import cgi from StringIO import StringIO import llnl.util.tty as tty from llnl.util.tty.colify import * @@ -70,9 +71,9 @@ def print_rst_package_list(): print print pkg.name print "-" * len(pkg.name) - print "Links" - print " * `Homepage <%s>`__" % pkg.homepage - print " * `%s/package.py <%s>`__" % (pkg.name, github_url(pkg)) + print "Links:" + print " * `%s <%s>`__" % (cgi.escape(pkg.homepage), pkg.homepage) + print " * `%s/package.py <%s>`__" % (pkg.name, github_url(pkg)) print if pkg.versions: print "Versions:" @@ -82,7 +83,7 @@ def print_rst_package_list(): print " " + ", ".join("`%s`_" % d if d != "mpi" else d for d in pkg.dependencies) print - print "Description" + print "Description:" print pkg.format_doc(indent=2) print print "-----" |