[enh] Simplify the pip install call

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
ljf (zamentur) 2022-08-07 15:04:55 +02:00 committed by GitHub
parent bcdb36b7b2
commit e94b7197f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ def _rebuild_venvs():
# Recreate the venv # Recreate the venv
rm(venv, recursive=True) rm(venv, recursive=True)
os.system(f"python -m venv {venv}") os.system(f"python -m venv {venv}")
status = os.system(f"bash -c 'source {venv}/bin/activate && pip install -r {venv}{VENV_REQUIREMENTS_SUFFIX} && deactivate'") status = os.system(f"{venv}/bin/pip install -r {venv}{VENV_REQUIREMENTS_SUFFIX}")
if status != 0: if status != 0:
logger.warning(m18n.n("migration_0021_venv_regen_failed", venv=venv)) logger.warning(m18n.n("migration_0021_venv_regen_failed", venv=venv))
else: else: