summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-10-06 14:50:49 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-06 12:50:49 -0700
commit415ddeecf8b2038074d90a18f0e956b726beb1a4 (patch)
tree70184fc14cb6029781f87795fcf4b48eb9f9d573 /lib
parentebef9628a3c37b3853c1d9a40873c5f0f819d2c9 (diff)
downloadspack-415ddeecf8b2038074d90a18f0e956b726beb1a4.tar.gz
spack-415ddeecf8b2038074d90a18f0e956b726beb1a4.tar.bz2
spack-415ddeecf8b2038074d90a18f0e956b726beb1a4.tar.xz
spack-415ddeecf8b2038074d90a18f0e956b726beb1a4.zip
Fix bugs preventing readthedocs from rebuilding the documentation (#1945)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/command_index.in6
-rw-r--r--lib/spack/docs/conf.py20
2 files changed, 12 insertions, 14 deletions
diff --git a/lib/spack/docs/command_index.in b/lib/spack/docs/command_index.in
index 8c5c97dd9c..6520352b42 100644
--- a/lib/spack/docs/command_index.in
+++ b/lib/spack/docs/command_index.in
@@ -1,6 +1,6 @@
-=================
-Command index
-=================
+=============
+Command Index
+=============
This is an alphabetical list of commands with links to the places they
appear in the documentation.
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index 08c57b8525..de136dc047 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -67,13 +67,12 @@ os.environ['COLIFY_SIZE'] = '25x120'
#
# Generate package list using spack command
#
-if not os.path.exists('package_list.rst'):
- with open('package_list.rst', 'w') as plist_file:
- subprocess.Popen(
- [spack_root + '/bin/spack', 'package-list'], stdout=plist_file)
+with open('package_list.rst', 'w') as plist_file:
+ subprocess.Popen(
+ [spack_root + '/bin/spack', 'package-list'], stdout=plist_file)
#
-# Find all the `spack-*` references and add them to a command index
+# Find all the `cmd-spack-*` references and add them to a command index
#
command_names = []
for filename in glob('*rst'):
@@ -83,12 +82,11 @@ for filename in glob('*rst'):
if match:
command_names.append(match.group(1).strip())
-if not os.path.exists('command_index.rst'):
- shutil.copy('command_index.in', 'command_index.rst')
- with open('command_index.rst', 'a') as index:
- index.write('\n')
- for cmd in sorted(command_names):
- index.write(' * :ref:`%s`\n' % cmd)
+shutil.copy('command_index.in', 'command_index.rst')
+with open('command_index.rst', 'a') as index:
+ index.write('\n')
+ for cmd in sorted(command_names):
+ index.write(' * :ref:`%s`\n' % cmd)
# Run sphinx-apidoc