Closed bbhtt closed 3 months ago
we can ensure that sphinx-build from venv is used first.
I know it relies on the venv path being exported and the executable being available there and still has the chance that sphinx-build
from host got used when the expectation was to use it from venv (when venv didn't get properly activated etc.).
I feel like it should be the reverse, if a distro packages both we want -3
, and if -3
doesn't exist then the normal one is likely fine.
Ah I see you want to avoid system versions... This is probably fine then. Users likely wouldn't have both versions installed.
Yea the idea was to prefer sphinx from venv first if the venv got activated correctly.
The opposite allows to escape venv if someone has both system packages and venv package installed.
With this it'll try from the venv first if it was activated and modules installed properly.
And fallback to
sphinx-build-3
only if it does not exist.The default build instructions now use a python virtual environment and inside that pip installs
sphinx-build
. Since the<venv>/bin
is exported as the first item in$PATH
once activated, we can ensure thatsphinx-build
from venv is used first.Outside the venv if
sphinx-build
is not foundsphinx-build-3
is tried.Closes https://github.com/flatpak/flatpak-docs/issues/477