]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson: doc - add python breathe dependency check
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 4 Feb 2019 17:57:17 +0000 (18:57 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:43:22 +0000 (10:43 +0100)
doc/meson.build

index c75bd48304738c5d3f259b75a9c23e9c637e3613..497e096f2e8d23a8f7babe69a60ab01e19d30e13 100644 (file)
@@ -2,7 +2,15 @@ if get_option('doc')
   # doc dependencies
   doxygen = find_program('doxygen')
   sphinx_build = find_program('sphinx-build')
-  # python-breathe is also required, but not auto detected because python 2/3
+
+  python_breathe = run_command('python3', '-c', 'import breathe')
+  if python_breathe.returncode() != 0
+    # some distros might use python2 sphinx
+    python_breathe = run_command('python2', '-c', 'import breathe')
+    if python_breathe.returncode() != 0
+      error('missing doc dependency: python breathe')
+    endif
+  endif
 
   # create doxygen in source dir
   doc_doxyxml = custom_target(