Ensure python from the venv is used
@@ -232,7 +232,10 @@ class BaseSphinx(BaseBuilder):
self.clean()
project = self.project
build_command = [
- 'python', '-m', 'sphinx', '-T',
+ self.python_env.venv_bin(filename='python'),
+ '-m',
+ 'sphinx',
+ '-T',
]
if self._force:
build_command.append('-E')
@@ -432,7 +435,7 @@ class PdfBuilder(BaseSphinx):
# Default to this so we can return it always.
self.run(
- 'python',
+ self.python_env.venv_bin(filename='python'),
'-m',
'sphinx',
'-b',
