Minor fixes to documentation build scripts

This commit is contained in:
Victor Zverovich 2016-06-02 06:52:07 -07:00
parent 9492b9ff03
commit 06045cb4a5
3 changed files with 9 additions and 9 deletions

View File

@ -94,7 +94,7 @@ def build_docs(version='dev', **kwargs):
html_dir = os.path.join(work_dir, 'html')
versions = [v for v in ['3.0.0', '2.0.0', '1.1.0'] if v != version]
check_call(['sphinx-build',
'-Dbreathe_projects.format=' + doxyxml_dir,
'-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
'-Dversion=' + version, '-Drelease=' + version,
'-Aversion=' + version, '-Aversions=' + ','.join(versions),
'-b', 'html', doc_dir, html_dir])

View File

@ -34,15 +34,15 @@ fmt_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.join(fmt_dir, 'doc'))
import build
work_dir = 'build'
build_dir = 'build'
# Virtualenv and repos are cached to speed up builds.
build.create_build_env(os.path.join(work_dir, 'virtualenv'))
build.create_build_env(os.path.join(build_dir, 'virtualenv'))
fmt_repo = Git(os.path.join(work_dir, 'fmt'))
fmt_repo = Git(os.path.join(build_dir, 'fmt'))
fmt_repo.update('git@github.com:fmtlib/fmt')
doc_repo = Git(os.path.join(work_dir, 'fmtlib.github.io'))
doc_repo = Git(os.path.join(build_dir, 'fmtlib.github.io'))
doc_repo.update('git@github.com:fmtlib/fmtlib.github.io')
for version in ['1.0.0']:#, '1.1.0', '2.0.0', '3.0.0']:
@ -79,7 +79,7 @@ for version in ['1.0.0']:#, '1.1.0', '2.0.0', '3.0.0']:
f.write(data)
# Build the docs.
html_dir = build.build_docs(version, doc_dir=target_doc_dir,
include_dir=fmt_repo.dir, work_dir=work_dir)
include_dir=fmt_repo.dir, work_dir=build_dir)
# Create symlinks for older versions.
for link, target in {'index': 'contents', 'api': 'reference'}.items():
os.symlink(target + '.html', os.path.join(html_dir, link) + '.html')