Skip to content

fix(sphinxdocs): fix path resolution for conf.py in separate directory - #4006

Open
rickeylev wants to merge 2 commits into
bazel-contrib:mainfrom
rickeylev:repro_sphinx_config_path
Open

fix(sphinxdocs): fix path resolution for conf.py in separate directory#4006
rickeylev wants to merge 2 commits into
bazel-contrib:mainfrom
rickeylev:repro_sphinx_config_path

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Sphinx documentation builds failed when conf.py was generated or located
in a separate directory because _relocate used the relative short_path of
config, setting sphinx_source_dir_path to the config subdirectory rather
than the source tree root.

Relocate ctx.file.config using paths.basename(ctx.file.config.path) so it
is always placed at the root of the generated _sources directory.

Work towards #3977.

Sphinx documentation builds failed when conf.py was generated or located in a separate directory because _relocate used the relative short_path of config, setting sphinx_source_dir_path to the config subdirectory rather than the source tree root.

Relocate ctx.file.config using paths.basename(ctx.file.config.path) so it is always placed at the root of the generated _sources directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant