From 0e7a5d82b45b29ac5a464d68ae06207140f5751d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 4 Mar 2019 15:30:58 -0800 Subject: [PATCH] setup_venv: Remove virtualenv-clone legacy upgrade code. Few folks will be upgrading from versions of Zulip old enough to not have virtualenv-clone, and those who are won't be able to use it due to older dependencies having been removed. --- scripts/lib/setup_venv.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/lib/setup_venv.py b/scripts/lib/setup_venv.py index 42ea866809..5a7784a179 100644 --- a/scripts/lib/setup_venv.py +++ b/scripts/lib/setup_venv.py @@ -1,4 +1,5 @@ +import logging import os import shutil import subprocess @@ -207,15 +208,10 @@ def try_to_copy_venv(venv_path, new_packages): # all of our recent virtualenvs. run_as_root(cmd) except subprocess.CalledProcessError: - # Virtualenv-clone is not installed. Install it and try running - # the command again. - try: - run([os.path.join(source_venv_path, "bin", "pip"), "install", - "--no-deps", "virtualenv-clone"]) - run_as_root(cmd) - except Exception: - # virtualenv-clone isn't working, so just make a new venv - return False + # Virtualenv-clone is either not installed or threw an + # error. Just return False: making a new venv is safe. + logging.warning("Error cloning virtualenv %s" % (source_venv_path,)) + return False # virtualenv-clone, unfortunately, copies the success stamp, # which means if the upcoming `pip install` phase were to