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
--- 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']