rosdoc2sphinx_builder copies and wraps a user's conf.py in a separate docs_build directory outside the source tree. Unfortunately this breaks relative paths to things like images and .rst files. I don't see a way to get the correct absolute path because exec(open("...").read()) is used by the wrapping conf.py to load the user's conf.py.
This PR solves it by copying the user_sourcedir content into the build directory.
An alternative solution might be to make the wrapping conf.pyimport the user's conf.py so that the user could make an absolute path from __file__.
In support of https://github.com/locusrobotics/fuse/pull/278
rosdoc2
sphinx_builder
copies and wraps a user'sconf.py
in a separatedocs_build
directory outside the source tree. Unfortunately this breaks relative paths to things like images and.rst
files. I don't see a way to get the correct absolute path becauseexec(open("...").read())
is used by the wrappingconf.py
to load the user'sconf.py
.This PR solves it by copying the
user_sourcedir
content into the build directory.An alternative solution might be to make the wrapping
conf.py
import
the user'sconf.py
so that the user could make an absolute path from__file__
.@methylDragon FYI