diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-23 10:46:58 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-23 10:46:58 -0800 |
commit | 049808a34fca6ede43e5c460740b55bb43f1cc27 (patch) | |
tree | 5e090d53952b31f1c3655c3600d0f4715309cd4a | |
parent | daef78f53853f30d342c6f3f650f04b25d7457f2 (diff) | |
parent | 2755171e08777a2b2e8449166c792956b7e8304c (diff) | |
download | spack-049808a34fca6ede43e5c460740b55bb43f1cc27.tar.gz spack-049808a34fca6ede43e5c460740b55bb43f1cc27.tar.bz2 spack-049808a34fca6ede43e5c460740b55bb43f1cc27.tar.xz spack-049808a34fca6ede43e5c460740b55bb43f1cc27.zip |
Merge remote-tracking branch 'origin/features/SPACK-46' into develop
Conflicts:
lib/spack/docs/packaging_guide.rst
-rw-r--r-- | lib/spack/docs/conf.py | 14 | ||||
-rw-r--r-- | lib/spack/docs/packaging_guide.rst | 40 | ||||
-rw-r--r-- | lib/spack/spack/__init__.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/cmd/package-list.py | 9 |
4 files changed, 35 insertions, 30 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 7b350f73b5..86df113074 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_SIZE'] = '25x80' @@ -95,9 +101,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/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 48986f8065..bc3bacf8f2 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2036,35 +2036,33 @@ this step if they have been. If Spack discovers that patches didn't apply cleanly on some previous run, then it will restage the entire package before patching. -``spack clean`` +``spack restage`` ~~~~~~~~~~~~~~~~~ +Restores the source code to pristine state, as it was before building. -There are several variations of ``spack clean``. With no arguments, -``spack clean`` runs ``make clean`` in the expanded archive directory. -This is useful if an attempted build failed, and something needs to be -changed to get a package to build. If a particular package does not -have a ``make clean`` target, this will do nothing. +Does this in one of two ways: + + 1. If the source was fetched as a tarball, deletes the entire build + directory and re-expands the tarball. + + 2. If the source was checked out from a repository, this deletes the + build directory and checks it out again. -``spack clean -w / --work`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Deletes the entire build directory and re-expands it from the downloaded -archive. This is useful if a package does not support a proper ``make clean`` -target. -``spack clean -d / --dist`` +``spack clean`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Deletes the build directory *and* the downloaded archive. If -``fetch``, ``stage``, or ``install`` are run again after this, the -process will start from scratch, and the archive archive will be -downloaded again. Useful if somehow a bad archive is downloaded -accidentally and needs to be cleaned out of the staging area. +Cleans up temporary files for a particular package, by deleting the +expanded/checked out source code *and* any downloaded archive. If +``fetch``, ``stage``, or ``install`` are run again after this, Spack's +build process will start from scratch. + ``spack purge`` ~~~~~~~~~~~~~~~~~ - -Cleans up *everything* in the build directory. You can use this to -recover disk space if temporary files from interrupted or failed -installs accumulate in the staging area. +Cleans up all of Spack's temporary files. Use this to recover disk +space if temporary files from interrupted or failed installs +accumulate in the staging area. This is equivalent to running ``spack +clean`` for every package you have fetched or staged. Keeping the stage directory on success 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 073363db0f..f048482845 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 * @@ -72,9 +73,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:" @@ -84,7 +85,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 "-----" |