summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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