mirror of https://github.com/zulip/zulip.git
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:
parent
4157d15ff1
commit
0e7a5d82b4
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -207,15 +208,10 @@ def try_to_copy_venv(venv_path, new_packages):
|
||||||
# all of our recent virtualenvs.
|
# all of our recent virtualenvs.
|
||||||
run_as_root(cmd)
|
run_as_root(cmd)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
# Virtualenv-clone is not installed. Install it and try running
|
# Virtualenv-clone is either not installed or threw an
|
||||||
# the command again.
|
# error. Just return False: making a new venv is safe.
|
||||||
try:
|
logging.warning("Error cloning virtualenv %s" % (source_venv_path,))
|
||||||
run([os.path.join(source_venv_path, "bin", "pip"), "install",
|
return False
|
||||||
"--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, unfortunately, copies the success stamp,
|
# virtualenv-clone, unfortunately, copies the success stamp,
|
||||||
# which means if the upcoming `pip install` phase were to
|
# which means if the upcoming `pip install` phase were to
|
||||||
|
|
Loading…
Reference in New Issue