diff options
Diffstat (limited to 'lib/spack/docs/conf.py')
-rw-r--r-- | lib/spack/docs/conf.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index db8d3d29dc..69ec2a0b33 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -51,6 +51,10 @@ from sphinx.apidoc import main as sphinx_apidoc # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('exts')) sys.path.insert(0, os.path.abspath('../external')) +if sys.version_info[0] < 3: + sys.path.insert(0, os.path.abspath('../external/yaml/lib')) +else: + sys.path.insert(0, os.path.abspath('../external/yaml/lib3')) sys.path.append(os.path.abspath('..')) # Add the Spack bin directory to the path so that we can use its output in docs. @@ -110,13 +114,13 @@ handling_spack = False for line in fileinput.input('spack.rst', inplace=1): if handling_spack: if not line.startswith(' :noindex:'): - print ' :noindex: %s' % ' '.join(spack.__all__) + print(' :noindex: %s' % ' '.join(spack.__all__)) handling_spack = False if line.startswith('.. automodule::'): handling_spack = (line == '.. automodule:: spack\n') - print line, + sys.stdout.write(line) # Enable todo items todo_include_todos = True |