[SciPy-dev] how scipy reference guide is generated
Forrest Sheng Bao
Wed Dec 23 22:29:28 CST 2009
Thanks for your answer. I am kinda confused and lost. I am a little bit
anxious that I can go thru the process converting a Python script to an HTML
Maybe I didn't formulate my questions clearly at the beginning. I want to
generate HTML or LaTeX docs from comments in my Python files, where my
comments are in reST format.
I saw that code in the doc page of scipy is like the format of my code. The
comments in reST format. I assume that I can generate an HTML page
from Python code with comments and my comments will automatically become the
contents of the HTML page. that's why I specify such a file as my master
file when run sphinx-quickstart, though it seems that I am wrong.
I have been reading this guide line all night without a clue.
At the end of that page, there is an example, example.py, which is a python
code commented by reST docstrings. But I couldn't find any documents telling
me what to do to that file.
There is another example at the end of that page, HOWTO_BUILD_DOCS.txt which
is in reST syntax. I can convert it using rst2html command, but fail to use
Sphinx to generate HTML as itself explained. I did "easy_install numpydoc"
and set "extensions = ['numpydoc']" in conf.py. But when I tried to "make
html," I saw this:
$ make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v0.6.3
Unknown event name: autodoc-process-docstring
make: *** [html] Error 1
Maybe that numpydoc has bugs?
On Wed, Dec 23, 2009 at 9:47 PM, <email@example.com> wrote:
> I don't know what your layout is, but the index file in doc/source
> should be a pure rst file not a python script. The python module files
> should be accessible through the python path. For some of the numpy
> specific rst directives and formatting you need the numpy sphinx
> plugins, but I don't remember if section headers in doc strings belong
> to that group.
I couldn't find a doc telling me what that rst file should contain and how
my python modules will be included in such an rst file.
I feel that Sphinx can not process any Python file but only reST file.
But how can I convert a Python script into reST file?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev