On 06/22/2010 10:38 AM, Pedro Ferreira wrote:
Hello,

I am trying to use automodule on one of my project's modules, and i'm
getting the following error message:

{{{
reading sources... [100%] test
/home/pferreir/indico/cds-indico/doc/api/source/test.rst:4: (WARNING/
2) autodoc can't import/find module 'indico.tests', it reported error:
"No module named tests", please check your spelling and sys.path
}}}

"indico" is a namespace package, and there's some other egg in the
python path that shares this namespace. If I remove it, it all works
correctly.
So, my question is: is there any way I can tell sphinx to grant
priority to the code it is running on (instead of some egg that is in
the path)? is there any other way to solve this?

Since automodule is just using normal python module loading (AFAIK), your best long term solution if you expect to have different versions of the package you are documenting around and you need to rely on automodule would be to learn to use virtualenv, so that you can set up a separate python environment for your documentation build.

One simpler immediate solution would be instead of an egg you could use your development copy of indico as your global one on python path using ``python setup.py develop`` or ``pip install -e``.

Hope that helps,

--
--Max Battcher--
http://worldmaker.net

--
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to