Skip to content

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

Closed
chiffa opened this issue Jan 8, 2016 · 5 comments
Closed

Possible bug: Sphinx's conf.py ignored #1908

chiffa opened this issue Jan 8, 2016 · 5 comments
Labels
Support Support question

Comments

@chiffa
Copy link
Contributor

chiffa commented Jan 8, 2016

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 executing conf.py and because of that the dependencies installation fail, along with the build. I know conf.py is not executed because it will print sys.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

@agjohnson
Copy link
Contributor

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.

@agjohnson agjohnson added the Support Support question label Jan 9, 2016
@chiffa
Copy link
Contributor Author

chiffa commented Jan 9, 2016

Is this a behavior that has changed recently? I remember getting the pipeline above to work about 10 months ago.

@agjohnson
Copy link
Contributor

It has not. We can't inspect your conf.py until your dependencies are installed, so this has always been the case.

@chiffa
Copy link
Contributor Author

chiffa commented Jan 10, 2016

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?

@agjohnson
Copy link
Contributor

Feel free to submit additions to the docs, they are open source.

chiffa added a commit to ank-forked/readthedocs.org that referenced this issue Jan 11, 2016
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.
ericholscher added a commit that referenced this issue Jan 12, 2016
Updated documentation with respect to the issue #1908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

2 participants