Skip to content

Inconsistent working directory for sphinx build #12445

@nlgranger

Description

@nlgranger

What's the problem this feature will solve?

When building a sphinx-based project, the build does not run in the project directory but rather in the directory which contains the conf.py file. All other commands run in the project directory.

This breaks relative paths that might be used while evaluating conf.py or while running sphinx extensions.

python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html

Describe the solution you'd like

Use the cloned project root as working directory for sphinx build.

Alternative solutions

None

Additional context

In the build log, the sphinx command looks like this:

python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html

The . should be parent directory of the sphinx configuration file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions