Commit 95e8965a authored by Godefroid Chapelle's avatar Godefroid Chapelle

Problem: verbose option not forwarded to pip

Solution: fix verbosity detection when calling pip
parent 55054714
Forward verbose option to pip
...@@ -1662,9 +1662,9 @@ def call_pip_install(spec, dest): ...@@ -1662,9 +1662,9 @@ def call_pip_install(spec, dest):
('import sys; sys.path[0:0] = %r; ' % path) + ('import sys; sys.path[0:0] = %r; ' % path) +
_pip_install_cmd, 'install', '--no-deps', '-t', dest] _pip_install_cmd, 'install', '--no-deps', '-t', dest]
level = logger.getEffectiveLevel() level = logger.getEffectiveLevel()
if level > 0: if level >= logging.INFO:
args.append('-q') args.append('-q')
elif level < 0: else:
args.append('-v') args.append('-v')
args.append(spec) args.append(spec)
......
...@@ -2462,18 +2462,26 @@ The default is prefer-final = true: ...@@ -2462,18 +2462,26 @@ The default is prefer-final = true:
... [buildout] ... [buildout]
... parts = eggs ... parts = eggs
... find-links = %(link_server)s ... find-links = %(link_server)s
... update-versions-file = versions-picked.cfg
... ...
... [eggs] ... [eggs]
... recipe = zc.recipe.egg:eggs ... recipe = zc.recipe.egg:eggs
... eggs = demo ... eggs = demo
... ''' % globals()) ... ''' % globals())
>>> print_(system(buildout+' -v'), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools', 'pip', 'wheel'. Installing ...
... ... written to versions-picked.cfg
Picked: demo = 0.3
... >>> cat('versions-picked.cfg')
Picked: demoneeded = 1.1 [versions]
demo = 0.3
<BLANKLINE>
# Required by:
# demo==0.3
demoneeded = 1.1
>>> remove('versions-picked.cfg')
Here we see that the final versions of demo and demoneeded are used. Here we see that the final versions of demo and demoneeded are used.
We get the same behavior if we add prefer-final = true We get the same behavior if we add prefer-final = true
...@@ -2484,18 +2492,26 @@ We get the same behavior if we add prefer-final = true ...@@ -2484,18 +2492,26 @@ We get the same behavior if we add prefer-final = true
... parts = eggs ... parts = eggs
... find-links = %(link_server)s ... find-links = %(link_server)s
... prefer-final = true ... prefer-final = true
... update-versions-file = versions-picked.cfg
... ...
... [eggs] ... [eggs]
... recipe = zc.recipe.egg:eggs ... recipe = zc.recipe.egg:eggs
... eggs = demo ... eggs = demo
... ''' % globals()) ... ''' % globals())
>>> print_(system(buildout+' -v'), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools', 'pip', 'wheel'. Updating ...
... ... written to versions-picked.cfg
Picked: demo = 0.3
... >>> cat('versions-picked.cfg')
Picked: demoneeded = 1.1 [versions]
demo = 0.3
<BLANKLINE>
# Required by:
# demo==0.3
demoneeded = 1.1
>>> remove('versions-picked.cfg')
If we specify prefer-final = false, we'll get the newest If we specify prefer-final = false, we'll get the newest
distributions: distributions:
...@@ -2506,18 +2522,26 @@ distributions: ...@@ -2506,18 +2522,26 @@ distributions:
... parts = eggs ... parts = eggs
... find-links = %(link_server)s ... find-links = %(link_server)s
... prefer-final = false ... prefer-final = false
... update-versions-file = versions-picked.cfg
... ...
... [eggs] ... [eggs]
... recipe = zc.recipe.egg:eggs ... recipe = zc.recipe.egg:eggs
... eggs = demo ... eggs = demo
... ''' % globals()) ... ''' % globals())
>>> print_(system(buildout+' -v'), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools', 'pip', 'wheel'. Updating ...
... ... written to versions-picked.cfg
Picked: demo = 0.4rc1
... >>> cat('versions-picked.cfg')
Picked: demoneeded = 1.2rc1 [versions]
demo = 0.4rc1
<BLANKLINE>
# Required by:
# demo==0.4rc1
demoneeded = 1.2rc1
>>> remove('versions-picked.cfg')
We get an error if we specify anything but true or false: We get an error if we specify anything but true or false:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment