Bug 1307305 - Don't use --trusted-host with easy_install; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Mon, 03 Oct 2016 17:10:52 -0700
changeset 420284 608496fa245398a6824cef68e26df94d471fbd4d
parent 420017 955840bfd3c20eb24dd5a01be27bdc55c489a285
child 532780 6e6f05733e6b9c189ce01caa70f503005ef1d38c
push id31163
push userbmo:gps@mozilla.com
push dateTue, 04 Oct 2016 00:11:06 +0000
reviewersted
bugs1307305, 1306691
milestone52.0a1
Bug 1307305 - Don't use --trusted-host with easy_install; r?ted 3fd83c9c0548 introduced the use of --trusted-host for use with pip. Unfortunately, it unconditionally added --trusted-host, even when easy_install is being used. This broke modules using easy_install (which is currently limited to pywin32). Removing easy_install and installing pywin32 is tracked in bug 1306691. MozReview-Commit-ID: ExiO22EUr0B
testing/mozharness/mozharness/base/python.py
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -275,17 +275,18 @@ class VirtualenvMixin(object):
                 self.info('error resolving %s (ignoring): %s' %
                           (parsed.hostname, e.message))
                 continue
 
             command.extend(["--find-links", link])
             if parsed.scheme != 'https':
                 trusted_hosts.add(parsed.hostname)
 
-        if self.pip_version >= distutils.version.LooseVersion('6.0'):
+        if (install_method != 'easy_install' and
+                    self.pip_version >= distutils.version.LooseVersion('6.0')):
             for host in sorted(trusted_hosts):
                 command.extend(['--trusted-host', host])
 
         # module_url can be None if only specifying requirements files
         if module_url:
             if editable:
                 if install_method in (None, 'pip'):
                     command += ['-e']