2017-10-16 53 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

相關問題