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 587503 bdb2387396b4a74dfefb7c983733eed3625e906a
parent 587502 c81fbc7bbc63ccde05ba7bc132b9cbd57f606da0
child 587504 38a6ffe35535198a3d2574abc723a2273fd3d939
child 587511 5752e6634d25832674e1a1196814947d3ecc81a8
child 587517 1e09dd84f0ac1cd88cead6df714e7230b24e9c11
child 587519 1e59d7151ab42f58d0db98091e20c11573ed5a53
child 587548 0f04ee5c2e1c916ae454c911bcead18a04927460
child 587567 9f1ff66471a6309b477dc0084a90f80e1eed15f3
child 587577 18da361f8c88efe55f6b0022cdd5fa64adcd6fa3
child 587581 ae9ea6b3159f140877e793d17cb61c18be526415
child 587582 5af912fbf7d9f066780d54b20e43ae9dd225ba38
child 587584 4b5f1fab3019e3f1c4a311540fd246d1e748a266
child 587589 c2c853cd6c11177cf51fba75bcffff5ca210065e
child 587618 3f23b184c4af4506e8a2214f4e3ec24d4ce025c2
child 587656 e40174fac7f78b02948679d00af7b327fb79f208
child 587726 8e3a62ad42ccae65225aa3392556b47b2776e778
child 587807 5c010031f867afe239c52715012b602ecf3a0232
child 587808 fe529543e8e66e552f026441d812a6f190b7957c
child 587867 fd0aea9e109675ab043b8bfb3d042f24e637c866
child 587872 3efb5386dcfba13dc0855fa09ff87df93e595c27
child 587923 758d3ebb7ca815971fcecf20162efd58163f29a1
child 587930 5e7c822fb37a24c98fee89e43979a23da08afbcb
child 587951 da541d772d5c2c1e4232b96af26e7aea0efd8cd3
child 587952 1e674972058d0b24924c10b1586247cbd5c7f7b6
child 588176 aa8733905d1d091a7b1599c57c5e58e9e29044b5
child 588218 d949774394cd0e1fe47cf90a36102fde899895b9
child 588497 a503175028ca249ee7597236431d7c63c88f8d57
child 591009 a42830dadc5376b699f3872a01135b85557df307
push id61732
push usermixedpuppy@gmail.com
push dateThu, 01 Jun 2017 06:57:08 +0000
reviewersphilor
bugs1369250
milestone55.0a1
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()