Title: Sphinx can't find when not started from the Doc/ directory
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mdk Nosy List: BTaskaya, mdk
Priority: normal Keywords: patch

Created on 2020-07-18 08:26 by mdk, last changed 2020-07-21 05:54 by mdk. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21529 merged mdk, 2020-07-18 08:31
Messages (1)
msg373888 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2020-07-18 08:26
When running the following command from the Doc/ directory:

    ./venv/bin/sphinx-build -Q -b gettext -D gettext_compact=0 . ../pot/

everything goes right, but when running the following from cpython direcory:

    ./Doc/venv/bin/sphinx-build -Q -b gettext -D gettext_compact=0 Doc pot

we get:

    Extension error:
    Could not import extension asdl_highlight (exception: No module named 'asdl')

This is because sys.path.append(os.path.abspath("../Parser/")) starts from the current directory, cpython/../Parser don't exists while Doc/../Parser exists.

It could be fixed by starting with a Path(__file__).resolve(), will PR it.
Date User Action Args
2020-07-21 05:54:50mdksetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-07-18 08:31:02mdksetkeywords: + patch
stage: patch review
pull_requests: + pull_request20665
2020-07-18 08:26:35mdkcreate