我有一个名为gaend的Google App Engine项目。我正在尝试使用readthedocs为其构建更好的文档。我已经使用如何为Google App Engine项目构建sphinx(readthedocs)文档?
> sphinx-quickstart
建立我的基地sphinx项目。跟着
> sphinx-apidoc -o . ../gaend
生成项目的API列表。然后我运行
sphinx-autobuild . _build/html
+--------- manually triggered build ---------------------------------------------
| Running Sphinx v1.5.2
| loading pickled environment... done
| building [mo]: targets for 0 po files that are out of date
| building [html]: targets for 0 source files that are out of date
| updating environment: 0 added, 1 changed, 0 removed
| reading sources... [100%] gaend
/Users/stephen/gaend/docs/gaend.rst:10: WARNING: autodoc: failed to import module u'gaend.bigquery'; the following exception was raised:
Traceback (most recent call last):
File "/Users/stephen/.virtualenvs/gaend/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 551, in import_object
__import__(self.modname)
File "/Users/stephen/gaend/gaend/bigquery.py", line 1, in <module>
from google.cloud import bigquery
ImportError: No module named google.cloud
...
ImportError: No module named google.appengine.ext
我认识到问题在于它无法访问Google Cloud SDK。我在运行单元测试时遇到了类似的问题,并且要做到这一点的工作是runner.py。但是,这依赖于我的系统上安装了Google Cloud SDK(安装了Python Google App Engine模块)。我如何在构建文档的readthedocs服务器上获得Google Cloud SDK(和Python GAE)?
感谢胡安,我做https://github.com/samedhi/gaend/commit/d279e0ada41c2225b23498a6bb7ddba94ae624e5。在当地工作,但当readthedocs试图在他们的服务器上构建我的文档时,当然会失败......也许我缺少一个步骤或什么? –