Bug 1410424 - [mozbuild] Add a 'quiet' argument to VirtualenvManager.install_pip_requirements r=mshal
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 06 Apr 2018 10:23:49 -0400
changeset 414679 1b366ada7c5dd408e6053a61cf3b729e8d397605
parent 414678 b4b2f2f22ab8ac18352e6b0ca7eb7efe3c6a9d60
child 414680 15a5e48d01a51dc1b493074443af4021f4133d91
push id62982
push userahalberstadt@mozilla.com
push dateFri, 20 Apr 2018 13:25:56 +0000
treeherderautoland@d34cf7a17b3b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1410424
milestone61.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 1410424 - [mozbuild] Add a 'quiet' argument to VirtualenvManager.install_pip_requirements r=mshal Some requirements.txt are very large and result in a lot of package already installed messages. Would be nice to hide this. MozReview-Commit-ID: FQecuePM0zZ
python/mozbuild/mozbuild/virtualenv.py
tools/docs/mach_commands.py
--- a/python/mozbuild/mozbuild/virtualenv.py
+++ b/python/mozbuild/mozbuild/virtualenv.py
@@ -483,17 +483,17 @@ class VirtualenvManager(object):
         args = [
             'install',
             '--use-wheel',
             package,
         ]
 
         return self._run_pip(args)
 
-    def install_pip_requirements(self, path, require_hashes=True):
+    def install_pip_requirements(self, path, require_hashes=True, quiet=False):
         """Install a pip requirements.txt file.
 
         The supplied path is a text file containing pip requirement
         specifiers.
 
         If require_hashes is True, each specifier must contain the
         expected hash of the downloaded package. See:
         https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode
@@ -506,16 +506,19 @@ class VirtualenvManager(object):
             'install',
             '--requirement',
             path,
         ]
 
         if require_hashes:
             args.append('--require-hashes')
 
+        if quiet:
+            args.append('--quiet')
+
         return self._run_pip(args)
 
     def _run_pip(self, args):
         # It's tempting to call pip natively via pip.main(). However,
         # the current Python interpreter may not be the virtualenv python.
         # This will confuse pip and cause the package to attempt to install
         # against the executing interpreter. By creating a new process, we
         # force the virtualenv's interpreter to be used and all is well.
--- a/tools/docs/mach_commands.py
+++ b/tools/docs/mach_commands.py
@@ -46,17 +46,18 @@ class Documentation(MachCommandBase):
     def build_docs(self, what=None, format=None, outdir=None, auto_open=True,
                    http=None, archive=False, upload=False):
         try:
             which.which('jsdoc')
         except which.WhichError:
             return die('jsdoc not found - please install from npm.')
 
         self._activate_virtualenv()
-        self.virtualenv_manager.install_pip_requirements(os.path.join(here, 'requirements.txt'))
+        self.virtualenv_manager.install_pip_requirements(
+            os.path.join(here, 'requirements.txt'), quiet=True)
 
         import sphinx
         import webbrowser
         import moztreedocs
 
         if not outdir:
             outdir = os.path.join(self.topobjdir, 'docs')
         if not what: