goerz / better-apidoc

A version of sphinx-apidoc with support for templating
BSD 2-Clause "Simplified" License
32 stars 6 forks source link

Can't run when setup.py is in source directory #2

Closed hanshoi closed 5 years ago

hanshoi commented 7 years ago

When I try to run command:

>> better-apidoc --templates=templatedir -o outputdir ..
error: option --templates not recognized

Otherwise this works but when using the --templates or -t option flags and there is a setup.py in source directory then this will fail. Error message is always that some option parameter is not recognized. This is because importlib.import_module('setup') doesn't work.

You can circumvent this problem by adding setup.py into your exclude list.

Ubuntu Python 2.7.12

goerz commented 5 years ago

better-apidoc can no longer run as a command line utility, but must be executed from inside conf.py, see https://github.com/goerz/better-apidoc#usage, which should get around this issue. In the near future, it will be merged into the sphinxcontrib.apidoc extension for a cleaner solution.