mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-27 06:35:37 +00:00
Improve error message when less is not installed
This commit is contained in:
parent
79d7aacff3
commit
a596b8724b
16
doc/build.py
16
doc/build.py
@ -2,7 +2,7 @@
|
|||||||
# Build the documentation.
|
# Build the documentation.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import os, shutil, tempfile
|
import errno, os, shutil, sys, tempfile
|
||||||
from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE
|
from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
@ -76,10 +76,16 @@ def build_docs():
|
|||||||
check_call(['sphinx-build', '-D',
|
check_call(['sphinx-build', '-D',
|
||||||
'breathe_projects.format=' + os.path.join(os.getcwd(), 'doxyxml'),
|
'breathe_projects.format=' + os.path.join(os.getcwd(), 'doxyxml'),
|
||||||
'-b', 'html', doc_dir, 'html'])
|
'-b', 'html', doc_dir, 'html'])
|
||||||
check_call(['lessc', '--clean-css',
|
try:
|
||||||
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
|
check_call(['lessc', '--clean-css',
|
||||||
os.path.join(doc_dir, 'cppformat.less'),
|
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
|
||||||
'html/_static/cppformat.css'])
|
os.path.join(doc_dir, 'cppformat.less'),
|
||||||
|
'html/_static/cppformat.css'])
|
||||||
|
except OSError, e:
|
||||||
|
if e.errno != errno.ENOENT:
|
||||||
|
raise
|
||||||
|
print('lessc not found; make sure that Less (http://lesscss.org/) is installed')
|
||||||
|
sys.exit(1)
|
||||||
return 'html'
|
return 'html'
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user