bug 1369250 - avoid hitting the network with virtualenv 15.1.0. a=philor CLOSED TREE
authorAki Sasaki <asasaki@mozilla.com>
Wed, 31 May 2017 21:04:18 -0700
changeset 361694 c81fbc7bbc63ccde05ba7bc132b9cbd57f606da0
parent 361693 edffa38ec0c515198f360f23d286290cb5081996
child 361695 bdb2387396b4a74dfefb7c983733eed3625e906a
push id43859
push userphilringnalda@gmail.com
push dateThu, 01 Jun 2017 06:41:21 +0000
treeherderautoland@3f23b184c4af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilor
bugs1369250
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1369250 - avoid hitting the network with virtualenv 15.1.0. a=philor CLOSED TREE MozReview-Commit-ID: 9Pyh3wapEvc
testing/mozharness/mozharness/base/python.py
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -415,16 +415,23 @@ 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,
                              halt_on_failure=True)