gi-docgen: detection of system-available gi-docgen flawed
Detected while building 2.42.6:
if I build on a clean installroot without gi-docgen installed (and also its deps missing), I get a failure like this:
[ 7s] Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
[ 7s] Looking for a fallback subproject for the dependency gi-docgen
[ 7s]
[ 7s] |Executing subproject gi-docgen method meson
[ 7s] |
[ 7s] |Project name: gi-docgen
[ 7s] |Project version: 2021.2
[ 7s] |Program python3 (jinja2, markdown, markupsafe, pygments, toml, typogrify) found: NO
[ 7s]
[ 7s] subprojects/gi-docgen/meson.build:10:0: ERROR: python3 is missing modules: jinja2, markdown, markupsafe, pygments, toml, typogrify
which sounds all correct (i.e. docgen not found, as not installed, and building not possible, as deps missing).
If I specify to install gi-docgen into the buildroot though, the build changes like this:
[ 8s] Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
[ 8s] Looking for a fallback subproject for the dependency gi-docgen
[ 8s]
[ 8s] |Executing subproject gi-docgen method meson
[ 8s] |
[ 8s] |Project name: gi-docgen
[ 8s] |Project version: 2021.2
[ 8s] |Program python3 (jinja2, markdown, markupsafe, pygments, toml, typogrify) found: YES (/usr/bin/python3) modules: jinja2, markdown, markupsafe, pygments, toml, typogrify
[ 8s] |Program gi-docgen.py found: YES (/home/abuild/rpmbuild/BUILD/gdk-pixbuf-2.42.4/subprojects/gi-docgen/gi-docgen.py)
[ 8s] |Build targets in project: 83
[ 8s] |Subproject gi-docgen finished.
[ 8s]
[ 8s] Dependency gi-docgen from subproject subprojects/gi-docgen found: YES 2021.2
This is wrong in two ways:
- It did not detected the existing gi-docgen (version 2021.1 installed)
- the subproject used ultimately also installs the docgen files into /usr/lib64/python3.8/site-packages…, which seems also not wanted.
The first issue seems to stem from the fact that gi-docgen does not ship any .pc or .cmake files, so the detection of it using dependency() is not applicable