summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-08-30 01:27:49 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-30 20:49:56 -0700
commit41675e5ed66e80ca4bc0ed5dfc77f7c9ddac81d8 (patch)
tree2a88f6f7139c48bbaa3297a67a5bbceff5a9a4f1
parent918cb1692114a16eb738a80023fcdd1c8d98b011 (diff)
downloadspack-41675e5ed66e80ca4bc0ed5dfc77f7c9ddac81d8.tar.gz
spack-41675e5ed66e80ca4bc0ed5dfc77f7c9ddac81d8.tar.bz2
spack-41675e5ed66e80ca4bc0ed5dfc77f7c9ddac81d8.tar.xz
spack-41675e5ed66e80ca4bc0ed5dfc77f7c9ddac81d8.zip
sorted command index, better colification.
-rw-r--r--lib/spack/docs/conf.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index 95549e3b1e..90a08a154e 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -43,6 +43,8 @@ import shutil
import subprocess
from glob import glob
+# -- Spack customizations -----------------------------------------------------
+
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -60,6 +62,10 @@ spack_version = subprocess.Popen(
[spack_root + '/bin/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'
+
#
# Generate package list using spack command
#
@@ -81,7 +87,7 @@ for filename in glob('*rst'):
shutil.copy('command_index.in', 'command_index.rst')
with open('command_index.rst', 'a') as index:
index.write('\n')
- for cmd in command_names:
+ for cmd in sorted(command_names):
index.write(' * :ref:`%s`\n' % cmd)
#
@@ -106,10 +112,6 @@ for line in fileinput.input('spack.rst', inplace=1):
print line,
-# Set an environment variable so that colify will print output like it would to
-# a terminal.
-os.environ['COLIFY_SIZE'] = '25x80'
-
# Enable todo items
todo_include_todos = True