2017-10-16 55 views

回答

1

似乎有关于这个已经备案的问题:https://github.com/rtfd/readthedocs.org/issues/2094

它包含了一个解决方法:

为别人运行到这一点,似乎你也可以围绕它使用'READTHEDOCS' env var有条件地修改破解install_requires在您的setup.py

这指向:

当RTD构建项目,它集READTHEDOCS环境变量字符串true。因此,在您的Sphinx conf.py文件中,您可以基于此改变行为。例如:

import os 
on_rtd = os.environ.get('READTHEDOCS') == 'True' 
if on_rtd: 
    html_theme = 'default' 
else: 
    html_theme = 'nature' 

OTOH,最后评论声称,它应该正常工作与当前的RTD版本。

+0

非常感谢您的帮助。有一个正在进行的公关添加swig https://github.com/rtfd/readthedocs-docker-images/issues/15,这一点在这里http://read-the-docs.readthedocs.io/en/latest/ faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules是非常有用的。 – purpletentacle

+0

啊,我明白了。那最后的评论可能是在谈论近期版本;-)顺便说一句。另一个FAQ位于解决方法指向的部分之下。 – NichtJens

相关问题