setup_venv: Skip virtualenv’s automatic download of setuptools.

It recently started failing on Debian 10 (buster).  We immediately
follow this by replacing these packages with our own versions from
pip.txt, anyway.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 902883d818)
This commit is contained in:
Anders Kaseorg
2021-09-23 13:11:09 -07:00
committed by Tim Abbott
parent 24277a144e
commit 0f5657b0ed

View File

@@ -330,7 +330,7 @@ def do_setup_virtualenv(venv_path: str, requirements_file: str) -> None:
if not try_to_copy_venv(venv_path, new_packages):
# Create new virtualenv.
run_as_root(["mkdir", "-p", venv_path])
run_as_root(["virtualenv", "-p", "python3", venv_path])
run_as_root(["virtualenv", "-p", "python3", "--no-download", venv_path])
run_as_root(["chown", "-R", "{}:{}".format(os.getuid(), os.getgid()), venv_path])
create_log_entry(get_logfile_name(venv_path), "", set(), new_packages)