forked from platypush/platypush
[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:
parent
a909dc5f0f
commit
f75a2159c7
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue