Fix some documentation build warnings. (#1902)

- Fix issue with package_list.py regeneration confusing Sphinx.
- Add -E option to avoid caching and make Sphinx happy.
This commit is contained in:
Todd Gamblin 2016-10-04 12:37:57 -07:00 committed by GitHub
parent 7806fded3e
commit 544fa3eddb
3 changed files with 13 additions and 15 deletions

View File

@ -2,7 +2,7 @@
# #
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXOPTS = SPHINXOPTS = -E
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
PAPER = PAPER =
BUILDDIR = _build BUILDDIR = _build

View File

@ -1,5 +1,4 @@
.. _command_index: =================
Command index Command index
================= =================

View File

@ -1,10 +1,7 @@
# flake8: noqa # flake8: noqa
############################################################################## ##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack. # This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # Created by Todd Gamblin, tgamblin@llnl.gov.
# LLNL-CODE-647188 # LLNL-CODE-647188
# #
# For details, see https://github.com/llnl/spack # For details, see https://github.com/llnl/spack
@ -70,9 +67,10 @@
# #
# Generate package list using spack command # Generate package list using spack command
# #
with open('package_list.rst', 'w') as plist_file: if not os.path.exists('package_list.rst'):
subprocess.Popen( with open('package_list.rst', 'w') as plist_file:
[spack_root + '/bin/spack', 'package-list'], stdout=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 `spack-*` references and add them to a command index
@ -85,11 +83,12 @@
if match: if match:
command_names.append(match.group(1).strip()) command_names.append(match.group(1).strip())
shutil.copy('command_index.in', 'command_index.rst') if not os.path.exists('command_index.rst'):
with open('command_index.rst', 'a') as index: shutil.copy('command_index.in', 'command_index.rst')
index.write('\n') with open('command_index.rst', 'a') as index:
for cmd in sorted(command_names): index.write('\n')
index.write(' * :ref:`%s`\n' % cmd) for cmd in sorted(command_names):
index.write(' * :ref:`%s`\n' % cmd)
# Run sphinx-apidoc # Run sphinx-apidoc