Hi, How about adding the module path `../src` to the top of `sys.path`? Autodoc extension builds document from python module. So the order of import paths is very important.
Thanks, Takeshi KOMIYA 2019年8月13日(火) 12:47 Alicia <[email protected]>: > > During using sphinx to generate autodoc for out project, it comes out a > problem that it will generate the doc for python instead of my own defined > module when they have the same names. > For details, i have a module named "array.py" and when i am using > "sphinx-apidoc -o XXX ../src/", the generated array.rst is as follows: > > array module > ============ > > .. automodule:: array > :members: > :undoc-members: > :show-inheritance: > > And when i using the command " make html " to generate the html files for all > the modules, the contents of array.html is not based on my own module, but > the module in python3.6. > > I have tried some solutions like remove the python package in sys.path > defined in config.py which throws another error as sphinx depends on some > modules in python. The only solution that worked is to change the module name. > > I want to know that is there any different solution to this problem? like > adding some constrains in some config files, instead of changing my modules' > name. > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/c609cf88-ec77-4a69-8898-c28496034311%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAOYU6juzN-1cZYNn7O89MZ1Qdu1jo4H6V38EiZ%3DHL-77g%40mail.gmail.com.
