Python-igraph dependency and Read the Docs

I have a Python library that depends on python-igraph, and I’d like to have Read the Docs automatically generate the Sphinx documentation. However, building the docs on RtD fails because the host doesn’t manage to install the igraph dependency, specifically its C core. Here’s the log output:

libtoolize or glibtoolize not found or not in the path!
We are going to build the C core of igraph.
  Source folder: vendor/source/igraph
  Build folder: vendor/build/igraph
  Install folder: vendor/install/igraph

Bootstrapping igraph...
Could not compile the C core of igraph.

error: Setup script exited with 1

I know that Vincent Traag’s leidenalg and louvain packages both have docs on RtD, but looking through those projects’ files, I couldn’t figure out how they go about building igraph. Has anyone figured this out before?

I think I found the answer myself: Vincent uses conda to install the dependencies. (Update: I can now confirm this solves the issue.)

Another workaround would be to use mock imports.

1 Like