Pass versions from CMake to Sphinx

This commit is contained in:
Victor Zverovich
2016-06-02 06:41:25 -07:00
parent 0d9870dd9e
commit 9492b9ff03
4 changed files with 31 additions and 22 deletions
+4 -2
View File
@@ -92,12 +92,14 @@ def build_docs(version='dev', **kwargs):
if p.returncode != 0:
raise CalledProcessError(p.returncode, cmd)
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,
'-Dversion=' + version, '-Drelease=' + version,
'-Aversion=' + version, '-b', 'html', doc_dir, html_dir])
'-Aversion=' + version, '-Aversions=' + ','.join(versions),
'-b', 'html', doc_dir, html_dir])
try:
check_call(['lessc', #'--clean-css',
check_call(['lessc', '--clean-css',
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
os.path.join(doc_dir, 'fmt.less'),
os.path.join(html_dir, '_static', 'fmt.css')])