Fix virtualenv bug when VIRTUALENV_ALWAYS_COPY is set

BUG=chromium:808434
TEST=Run tests

Change-Id: Iab44fc3a2e18b19d4e3d8486c5ec16b4e382d2cc
Reviewed-on: https://chromium-review.googlesource.com/909532
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/venv/cros_venv/venvlib.py b/venv/cros_venv/venvlib.py
index fc909e4..408543e 100644
--- a/venv/cros_venv/venvlib.py
+++ b/venv/cros_venv/venvlib.py
@@ -196,6 +196,10 @@
 
 def _create_venv(venvdir, logfile):
     """Create a virtualenv at the given path."""
+    env = os.environ.copy()
+    # TODO(crbug.com/808434): upstream virtualenv has a bug when this is
+    # set.  See also https://github.com/pypa/virtualenv/issues/565
+    env.pop('VIRTUALENV_ALWAYS_COPY', None)
     # TODO(ayatane): Ubuntu Precise ships with virtualenv 1.7, which
     # requires specifying --setuptools, else distribute is used
     # (distribute is deprecated).  virtualenv after 1.10 uses setuptools
@@ -206,7 +210,7 @@
                '--extra-search-dir', _PACKAGE_DIR, '--setuptools',
                '--clear']
     try:
-        _log_check_call(command, logfile=logfile)
+        _log_check_call(command, logfile=logfile, env=env)
     except OSError as e:
         raise VirtualenvMissingError(e), None, sys.exc_info()[2]