diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2017-03-07 09:32:43 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-03-31 13:40:41 -0700 |
commit | 0331b08c64abbc3d7c185d9650007be1de238cfc (patch) | |
tree | b24454c749587ffe7d4857554399c50f92def3f2 /lib/spack/docs/conf.py | |
parent | bc404532ea875ecc6982d049dc7c7f041aa74443 (diff) | |
download | spack-0331b08c64abbc3d7c185d9650007be1de238cfc.tar.gz spack-0331b08c64abbc3d7c185d9650007be1de238cfc.tar.bz2 spack-0331b08c64abbc3d7c185d9650007be1de238cfc.tar.xz spack-0331b08c64abbc3d7c185d9650007be1de238cfc.zip |
Update externals to work with Python 3
- Update YAML version to support Python 3
- Python 3 support for ordereddict backport
- Exclude Python3 YAML from version tests.
- Vendor six into Spack.
- Make Python version-check tests work with Python 3
- Add ability to add version check exceptions with '# nopyqver' line
comments.
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 |