[platyvenv] Add the venv bin directory to the PATH.

After creating the virtual environment, we should add `<VENV_DIR>/bin`
to the `PATH` variable, so any next `python`/`pip` commands will be
executed in the new environment.
This commit is contained in:
Fabio Manganiello 2023-10-22 02:28:31 +02:00
parent a909dc5f0f
commit f75a2159c7
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -133,6 +133,9 @@ class VenvBuilder(BaseBuilder):
logger.info('Installing base Python dependencies under %s...', self.output)
subprocess.call([*self._pip_cmd, 'pip', '.'])
# Add <output>/bin to the PATH
os.environ['PATH'] = os.path.join(self.output, 'bin') + ':' + os.environ['PATH']
def _install_extra_pip_packages(self, deps: Dependencies):
"""
Install the extra pip dependencies inferred from the configured