Bug 1369250 - set VIRTUALENV_NO_DOWNLOAD so virtualenv versions >=14 will know to not download new packages, and older versions won't object to not knowing about the commandline --no-download, a=philor CLOSED TREE
authorAki Sasaki <asasaki@mozilla.com>
Wed, 31 May 2017 22:47:08 -0700
changeset 409794 bdb2387396b4a74dfefb7c983733eed3625e906a
parent 409793 c81fbc7bbc63ccde05ba7bc132b9cbd57f606da0
child 409813 3f23b184c4af4506e8a2214f4e3ec24d4ce025c2
child 409876 0f04ee5c2e1c916ae454c911bcead18a04927460
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilor
bugs1369250
milestone55.0a1
first release with
nightly linux32
bdb2387396b4 / 55.0a1 / 20170601100220 / files
nightly linux64
bdb2387396b4 / 55.0a1 / 20170601100220 / files
nightly mac
bdb2387396b4 / 55.0a1 / 20170601030206 / files
nightly win32
bdb2387396b4 / 55.0a1 / 20170601030206 / files
nightly win64
bdb2387396b4 / 55.0a1 / 20170601030206 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1369250 - set VIRTUALENV_NO_DOWNLOAD so virtualenv versions >=14 will know to not download new packages, and older versions won't object to not knowing about the commandline --no-download, a=philor CLOSED TREE
testing/mozharness/mozharness/base/python.py
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -415,30 +415,24 @@ class VirtualenvMixin(object):
             for module in ('distribute', 'pip'):
                 if c.get('%s_url' % module):
                     self.download_file(c['%s_url' % module],
                                        parent_dir=dirs['abs_work_dir'])
 
             virtualenv_options = c.get('virtualenv_options',
                                        ['--no-site-packages', '--distribute'])
 
-            # ugly hack to avoid virtualenv 15.1.0 hitting the network.
-            # taskcluster uses virtualenv 15.1.0; buildbot has been
-            # using virtualenv 1.7.1.2
-            # https://github.com/pypa/setuptools/issues/1042
-            if os.environ.get("TASK_ID"):
-                virtualenv_options.append("--no-download")
-
         if os.path.exists(self.query_python_path()):
             self.info("Virtualenv %s appears to already exist; skipping virtualenv creation." % self.query_python_path())
         else:
             self.mkdir_p(dirs['abs_work_dir'])
             self.run_command(virtualenv + virtualenv_options + [venv_path],
                              cwd=dirs['abs_work_dir'],
                              error_list=VirtualenvErrorList,
+                             partial_env={'VIRTUALENV_NO_DOWNLOAD': "1"},
                              halt_on_failure=True)
 
         # Resolve the pip version so we can conditionally do things if we have
         # a modern pip.
         pip = self.query_python_path('pip')
         output = self.get_output_from_command([pip, '--version'],
                                               halt_on_failure=True)
         words = output.split()