Bug 1275437 - Added installing of Mercurial to Windows boostrapper.
Added convenience method for installing from pip.
Windows bootstrapper implements upgrade_mercurial to install mercurial from pip.
MozReview-Commit-ID: ClqNA2NmQcc
--- a/python/mozboot/mozboot/windows.py
+++ b/python/mozboot/mozboot/windows.py
@@ -45,16 +45,19 @@ class WindowsBootstrapper(BaseBootstrapp
if not self.which('pacman.exe'):
raise NotImplementedError('The Windows bootstrapper only works with msys2 with pacman. Get msys2 at '
'http://msys2.github.io/')
print 'Using an experimental bootstrapper for Windows.'
def install_system_packages(self):
self.pacman_install(*self.SYSTEM_PACKAGES)
+ def upgrade_mercurial(self, current):
+ self.pip_install('mercurial')
+
def install_browser_packages(self):
self.pacman_install(*self.BROWSER_PACKAGES)
def install_mobile_android_packages(self):
raise NotImplementedError('We do not support building Android on Windows. Sorry!')
def install_mobile_android_artifact_mode_packages(self):
raise NotImplementedError('We do not support building Android on Windows. Sorry!')
@@ -75,8 +78,13 @@ class WindowsBootstrapper(BaseBootstrapp
def pacman_install(self, *packages):
command = ['pacman', '--sync', '--needed']
if self.no_interactive:
command.append('--noconfirm')
command.extend(packages)
self.run(command)
+
+ def pip_install(self, *packages):
+ command = ['pip', 'install', '--upgrade']
+ command.extend(packages)
+ self.run(command)