Closed kloczek closed 2 years ago
Closing .. I just found that accidentally I had installed sphobjinv
in build env and this is why it was working :(
Yep, the dev workflow for the project involves a pip install -e .
. Without that, I would also need to patch sys.path
in conf.py
.
Sorry, no magic here! 🫤
Yep, the dev workflow for the project involves a
pip install -e .
. Without that, I would also need to patchsys.path
inconf.py
.
pep517 build which I'm executing before generate documentation alredy adds to the tree module metadata so that step is not needed and without alter sys.path
in conf.py
build-sphinx does not work.
Disclaimer: This ticket is not the issue report. It is just humble question 😃
I'm packaging as rpm packages python modules for some distribution. Already I've done almost 900 such packages. Part of the packaging goals is include sphinx based documentation as man pages if sphinx based documentation is provided. Such goal needs usually needs only small modyfications and at the moment I have almost 600 of all modules which have ocumentation in such form .. however I'm struggling in most of the cases when module source code needs to be scanned usually by autodoc sphinx extension. Usually what is missing is path to the module code. Usually such path is provided by lines like below in copy.py:
I just found that your module does not need typical modyfication in copy.py and all works (almost) flawlessly 😃
I cannot find find in your copy.py any traces of setting up path to the module and to be honest I'm puzzled a bit. May I ask for explaination how it is done? I'm asking because your solution seems does not need running sphinx-build in tox venv or does not need to heve module already installed or alter $PYTHONPATH. Looks like your module contains something whcih could be spread across all other modules, and I may try to spread simillar solution to other modules. 😄 Thx ..