Skip to content

Commit dac5532

Browse files
authored
Merge pull request #8676 from rokroskar/faq-update
docs: update faq to mention apt for dependencies
2 parents 526e649 + 8895b91 commit dac5532

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

docs/faq.rst

+16-8
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ which details your dependencies. See our guide on :ref:`guides/reproducible-buil
3737
You can also set your project documentation to install your project itself
3838
as a dependency.
3939

40-
If your project or its dependencies rely on C libraries,
41-
see :ref:`faq:I get import errors on libraries that depend on C modules`.
40+
Your build may depend on extensions that require additional system packages to
41+
be installed. If you are using a :doc:`Configuration File <config-file/v2>` you
42+
can :ref:`add libraries with apt <config-file/v2:build.apt_packages>` to the
43+
Ubuntu-based builder .
44+
45+
If your project or its dependencies rely on C libraries that cannot be installed
46+
this way, see :ref:`faq:I get import errors on libraries that depend on C modules`.
4247

4348

4449
My project requires some additional settings
@@ -60,12 +65,15 @@ I get import errors on libraries that depend on C modules
6065

6166
Another use case for this is when you have a module with a C extension.
6267

63-
This happens because our build system doesn't have the dependencies for building your project.
64-
This happens with things like ``libevent``, ``mysql``, and other Python packages that depend on C libraries.
65-
We can't support installing random C binaries on our system, so there is another way to fix these imports.
68+
This happens because the build system does not have the dependencies for
69+
building your project, such as C libraries needed by some Python packages (e.g.
70+
``libevent`` or ``mysql``). For libraries that cannot be :ref:`installed via apt
71+
<config-file/v2:build.apt_packages>` in the builder there is another way to
72+
successfully build the documentation despite missing dependencies.
6673

67-
With Sphinx you can use the built-in `autodoc_mock_imports`_ for mocking.
68-
If such libraries are installed via ``setup.py``, you also will need to remove all the C-dependent libraries from your ``install_requires`` in the RTD environment.
74+
With Sphinx you can use the built-in `autodoc_mock_imports`_ for mocking. If
75+
such libraries are installed via ``setup.py``, you also will need to remove all
76+
the C-dependent libraries from your ``install_requires`` in the RTD environment.
6977

7078
.. _autodoc_mock_imports: http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports
7179

@@ -279,7 +287,7 @@ in the ``.readthedocs.yaml`` config file if it contains::
279287
- python=3.9
280288
- scipy
281289
...
282-
290+
283291
.. _Anaconda Project: https://anaconda-project.readthedocs.io/en/latest/
284292

285293

0 commit comments

Comments
 (0)