trivial: Check for python3-markdown >= 3.3.4 for gi-docgen

This commit is contained in:
Richard Hughes 2021-06-10 20:59:58 +01:00
parent a02c1073f2
commit 7b40a84f24
2 changed files with 19 additions and 0 deletions

15
docs/test-deps.py Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
import sys
import markdown
from distutils.version import LooseVersion
# https://github.com/fwupd/fwupd/pull/3337#issuecomment-858947695
if LooseVersion(markdown.version) < LooseVersion("3.3.4"):
print("python3-markdown version 3.3.4 required for gi-docgen")
sys.exit(1)
# success
sys.exit(0)

View File

@ -538,6 +538,10 @@ root_incdir = include_directories('.')
if get_option('docs') == 'gtkdoc'
gtkdocscan = find_program('gtkdoc-scan')
elif get_option('docs') == 'docgen'
r = run_command([python3, 'docs/test-deps.py'])
if r.returncode() != 0
error(r.stdout())
endif
gidocgen_dep = dependency('gi-docgen',
version: '>= 2021.1',
fallback: ['gi-docgen', 'dummy_dep'],