From 6e6ea10997503d428bf883c832c2fd4a7b0311ad Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Thu, 4 Oct 2018 23:23:46 +0100 Subject: [PATCH 1/4] ./tools/build.sh runs ./pgidocgen.py and so one needs to run it from the top directory --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9d3cd15d..9c8c18e1 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,7 @@ The following creates docs for the in gnome-music included libgd:: XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share/gnome-music/ \ GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/girepository-1.0/ \ - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/ ./build.sh Gd-1.0 + LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/ ./tools/build.sh Gd-1.0 Intersphinx From 2daa1ef74c89bb001447aa2b041bb48c6396a80d Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Fri, 5 Oct 2018 00:28:19 +0100 Subject: [PATCH 2/4] further explanation, and HarfBuzz from source example --- README.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9c8c18e1..8cff8a97 100644 --- a/README.rst +++ b/README.rst @@ -48,12 +48,28 @@ The resulting docs can be found in ``_docs/_build`` How do I build docs for private libraries? ------------------------------------------ -The following creates docs for the in gnome-music included libgd:: +The following creates docs for the libgd bundled and included in gnome-music:: XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share/gnome-music/ \ GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/girepository-1.0/ \ LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/ ./tools/build.sh Gd-1.0 +Explanations: + +1) ``$XDG_DATA_DIR/gir-1.0`` (not ``$XDG_DATA_DIR``!) contains ``Gd-1.0.gir``. + +2) ``$GI_TYPELIB_PATH`` contains ``Gd-1.0.typelib``. + +3) ``$LD_LIBRARY_PATH`` contains ``libgd.so``. + +Another example. For the case of HarfBuzz freshly built from source, +``HarfBuzz-0.0.gir``, ``HarfBuzz-0.0.typelib`` are both inside a ``src`` +sub-directory in the HarfBuzz source tree, while ``libharfbuzz.so`` +is in a ``src/.libs`` sub-directory. So you need to create a directory +``gir-1.0`` further inside, copy ``HarfBuzz-0.0.gir`` over there, and set +``$XDG_DATA_DIR`` to the **parent directory** of your newly created ``gir-1.0``, +``$GI_TYPELIB_PATH`` to ``src``, and ``$LD_LIBRARY_PATH`` to ``src/.libs``. + Intersphinx ----------- From 202eceeddc54fe48fd2a2caee79cc5d7f8aa518f Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Fri, 5 Oct 2018 01:19:49 +0100 Subject: [PATCH 3/4] workaround for Redhat/Fedora cert.org certifi package quirk --- tools/bootstrap.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/bootstrap.sh b/tools/bootstrap.sh index cbb312dc..55d5b879 100755 --- a/tools/bootstrap.sh +++ b/tools/bootstrap.sh @@ -19,4 +19,10 @@ else pip install beautifulsoup4 pip install jinja2 pip install cairocffi + + # Redhat/Fedora systems may have a certifi package from cert.org, + # which is without cacert.pem . + if [ -f /etc/redhat-release ]; then + pip install --ignore-installed certifi + fi fi From 3141d14c882fbc86feee014b56f9bc836cd9bc41 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Fri, 5 Oct 2018 01:40:33 +0100 Subject: [PATCH 4/4] adding notes on PYTHONPATH about finding the newly created virtualenv Final part of doc update. Closes https://github.com/pygobject/pgi-docgen/issues/171 --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 8cff8a97..826d43c7 100644 --- a/README.rst +++ b/README.rst @@ -29,6 +29,9 @@ Requirements Calling ``source ./tools/bootstrap.sh`` will put you in a virtualenv with all dependencies installed (except graphviz). +Afterwards, you may need to set ``PYTHONPATH`` to +``_venv/lib/python*/site-packages/``, where ``*`` is the +version number of your python installation. How do I get started? ---------------------