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.
This commit is contained in:
Tim Abbott 2019-03-04 15:30:58 -08:00
parent 4157d15ff1
commit 0e7a5d82b4
1 changed files with 5 additions and 9 deletions

View File

@ -1,4 +1,5 @@
import logging
import os
import shutil
import subprocess
@ -207,14 +208,9 @@ 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
# 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,