Closed pief closed 4 years ago
Hi @pief,
for now, setting PYTHONPATH=".:$PYTHONPATH"
should do.
I will take this into consideration for Pydoc-Markdown v3, even if it's not quite as applicable (there will still be cases where a custom implementation of something may be used, but in this particular case it does not require a new loader class).
This is no longer applicable in Pydoc-Markdown 3. Since I won't be doing any feature work on the 2.x version anymore, I'm going to close this out.
@NiklasRosenstein what's the v3 way to implement a custom processor (e.g. inherit from pydoc_markdown.contrib.processors.pydocmd.PydocmdProcessor
in some file somewhere?)
Hey @casperdcl ,
Currently all plugins need to be registered as a Python entrypoint.
Example:
Afaik entrypoints can only be registered via a setup script. If that doesn't fit in your workflow now, we could maybe add a command-line option or additionally support resolving plugins by their FQN additionally to the entrypoint name. Please do open a new issue in that case though :)
I'm trying to use pydocmd in combination with a Django project. Because pydocmd appears to Python
import
the files it processes, this requires a special loader class that does the Django-specific setup. So I tried apydocmd.yml
configuration such asbut then, when calling
pydocmd build
from within the top-level project directory where I have bothpydocmd.yml
as well as mymyloader.py
I get an import exception:Upon examining
imp.py
I noticed that this happens because my project directory is not part ofsys.path
, presumably due to the waypydocmd
calls__main__.py
.If not like this, what is the intended way to configure a project-specific loader?