On Mon, Jan 30, 2012 at 2:31 AM, Lele Gaifax <[email protected]> wrote:
> On Sun, 29 Jan 2012 12:51:00 -0600
> C Anthony Risinger <[email protected]> wrote:
>
>> btw ... does anyone have experience with sphinx (new thread)?  i
>> can't get the autodoc running because pyjamas.* isn't real modules
>
> Yes, somewhat, more than one year ago, but didn't get it right and in
> the middle of the battle I had a context switch that distracted me :)
>
> Anyway, the Sphinx autodoc parser does not use the Python parser to
> extract documentation, IIRC. It just need indications on how to reach
> the pj sources, that is, I just added
>
>    # Insert needed paths
>    for path in os.environ.get('PYJAMAS_PATHS', '').split(':'):
>        sys.path.insert(0, path)

i tried `PYTHONPATH={path/to/pyjamas} sphinx-build`, but it tried to
import everything and thus failed on various parts ... i don't have
the log on hand but it was trying to import.

from what i read, AST parsing is used for pulling the members/etc ...
but autodoc seems to be python only due too requiring an import (i
read a GSoC proposal to get other langs working via ANTLR).  i'm new
to this though, and likely doing something wrong.

> to the ``conf.py`` file, and
>
>    SPHINXBUILD = $(PYJAMAS_PATHS) sphinx-build
>    ...
>    # Pyjamas specific paths
>    PJ_LIBRARY = $(abspath src/pyjamas/library)
>    PJ_ADDONS = $(abspath src/pyjamas/addons)
>    PYJAMAS_PATHS := PYJAMAS_PATHS=$(PJ_LIBRARY):$(PJ_ADDONS)
>
> in its ``Makefile``.

i will play around a bit more, probably will be back :-)

On Mon, Jan 30, 2012 at 3:48 AM, lkcl luke <[email protected]> wrote:
> On Mon, Jan 30, 2012 at 8:31 AM, Lele Gaifax <[email protected]> wrote:
>> On Sun, 29 Jan 2012 12:51:00 -0600
>> C Anthony Risinger <[email protected]> wrote:
>>
>>> btw ... does anyone have experience with sphinx (new thread)?  i
>>> can't get the autodoc running because pyjamas.* isn't real modules
>
>  yes they are!  i ran epydoc to create this, over a year ago!
> http://pyjs.org/api/

i know that's what i had mentioned, epydoc has a --parse-only mode,
but i can't figure out how to get it to generate much more than the
module names (i can't get classes, class members, or anything else
...).  i'm trying to find a way to document not only the pyjs API, but
the overrides as well.

what did you run to generate the epydoc version?  i know the API is
valid python modules, but they can't be blindly imported.

-- 

C Anthony

Reply via email to