Use VIRTUALENV_NO_DOWNLOAD in pre-commit

This commit is contained in:
Anthony Sottile 2017-06-01 14:11:45 -07:00
parent cb71ea09ff
commit a1e3a0a131

View file

@ -72,7 +72,8 @@ def install_environment(
venv_cmd.extend(['-p', norm_version(version)])
else:
venv_cmd.extend(['-p', os.path.realpath(sys.executable)])
repo_cmd_runner.run(venv_cmd, cwd='/')
venv_env = dict(os.environ, VIRTUALENV_NO_DOWNLOAD='1')
repo_cmd_runner.run(venv_cmd, cwd='/', env=venv_env)
with in_env(repo_cmd_runner, version):
helpers.run_setup_cmd(
repo_cmd_runner,