-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Possible bug: Sphinx's conf.py ignored #1908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Mocking only avoids dependencies that are not installed during Sphinx execution. You still need to specify a pruned list of dependencies to RTD, otherwise we'll just continue trying to install those packages. Many projects use a separate requirements file with docs-specific packages here. |
Is this a behavior that has changed recently? I remember getting the pipeline above to work about 10 months ago. |
It has not. We can't inspect your conf.py until your dependencies are installed, so this has always been the case. |
Ok. Once I added the "on_rtd" into the setup.py to adjust the dependencies that actually need to be installed, it works. Would you mind adding this step into the documentation? |
Feel free to submit additions to the docs, they are open source. |
In order to make C-module dependencies work on RTD they need not only to be mocked by also removed from setup.py to prevent installation attempts.
Updated documentation with respect to the issue #1908
I am trying to build the documentation for my project on the RTFD. Building the documentation works fine on my machine, however when I try to build the documentation on the readthedocs.org, the build fails due to the attempt to install C python modules.
Following the RTFD FAQ I mock my modules within the Sphinx's
conf.py
file. However it seems that RTFD tries to install the project without first executingconf.py
and because of that the dependencies installation fail, along with the build. I knowconf.py
is not executed because it will printsys.path
modifications when executed and/or imported.I tried to explicitely point out the location of the conf.py file, along with letting RTFD discover it itself, but it seems that the problem persists. I was not able to find any mention of that problem online and the contradiction of that behavior to what is indicated in FAQ seems to indicate that this behavior might be a bug
The text was updated successfully, but these errors were encountered: