How can I set up "Reading Documents" so that the Sphinx autostart function works?

My project is not built using autodoc. I came across this frequently asked question that my project was not built in autodoc . But some of the dependencies include c code that will not run on Build the Docs servers. So I read the approach on this blog that explains that I should use a layout . This relates to the stackoverflow question "How-to-mock-so-that-from-x-import-works".

In the advanced settings section of the “Reading Documents” administration page, you can use virtualenv, which I checked and then requested the path to the root of my project in request.txt.

The project directory is structured as:

GatherNews/
    requirements.txt

When I use "GatherNews / requirements.txt" as a path. I get an error message:

/var/build/user_builds/gathernews/checkouts/latest/docs/api/grss.rst:10: WARNING: autodoc: failed to import class u'CaptureFeeds 'from module u'gathernews.gRSS'; the following exception was made:

Traceback (last last call):

File "/home/docs/checkouts/readthedocs.org/user_builds/gathernews/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object import (self .modname)

File "/home/docs/checkouts/readthedocs.org/user_builds/gathernews/envs/latest/local/lib/python2.7/site-packages/gathernews/ init .py", line 1, in import gRSS

"/home/docs/checkouts/readthedocs.org/user_builds/gathernews/envs/latest/local/lib/python2.7/site-packages/gathernews/gRSS.py", 38, feedparser

ImportError: feedparser/var/build/user_builds/gathernews/checkouts/latest/docs/_themes/README.rst:: :

: ? , .txt ? .txt , mock ?

+4
1

https://github.com/Bonza-Times/GatherNews ReadTheDocs. , requirements.txt. :

.

GatherNews. requirements.txt , git.

Use virtualenv, ReadTheDocs , virtualenv sys.path sphinx-build script.

, feedparser C. libxml2, .

requirements.txt , .

" ", , :

Advanced settings

+4

Source: https://habr.com/ru/post/1527177/


All Articles