pygobject / pgi-docgen

API Documentation Generator for PyGObject
https://lazka.github.io/pgi-docs/
GNU Lesser General Public License v2.1
127 stars 36 forks source link

Trying to build UDisks documentation #147

Closed elboulangero closed 7 years ago

elboulangero commented 7 years ago

Hi !

I wish to build the doc for UDisks. Out of the box, it doesn't work.

$ ./tools/build.sh UDisks-2.0
GIR file for UDisks-2.0 not found, aborting.

Somehow I ended up looking in pgidocgen/girdata/docref/ and I saw a bunch of json files there for different libraries, and I suspect that these are the libraries supported "out of the box". UDisks is not part of them.

I tried the steps mentioned in "build docs for private libraries". First, I ensured that everything UDisks-related is installed on my machine.

$ ls /usr/lib/x86_64-linux-gnu/girepository-1.0/ | grep UDisks
UDisks-2.0.typelib
$ ls /usr/lib/x86_64-linux-gnu/ | grep udisks
libudisks2.so.0
libudisks2.so.0.0.0

Then I tried the command:

$ GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0/ \
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu \
./tools/build.sh UDisks-2.0
GIR file for UDisks-2.0 not found, aborting.

What do I miss here ? Do I need to install some stuff in the virtual environment ?

lazka commented 7 years ago

The files in girdata are optional. You need the .gir file:

> sudo apt-file search UDisks-2.0.gir
libudisks2-dev: /usr/share/gir-1.0/UDisks-2.0.gir
> sudo apt install libudisks2-dev
...
elboulangero commented 7 years ago

Indeed, my mistake. Now it builds without any fuss.

$ ./tools/build.sh UDisks-2.0
Gio-2.0: building...
GObject-2.0: building...
UDisks-2.0: building...
Queue build for GObject-2.0
Build started for GObject-2.0
...
UDisks-2.0 finished: 4/4 done
All done

Thanks !