Commit 4efe9b35 authored by Mitar's avatar Mitar

Quiet pip operations.

parent 25ed32a0
......@@ -425,7 +425,7 @@ def validate_installation(primitive_names, interface_version, installation, anno
if installation_entry['type'] == 'PIP' and 'package' in installation_entry:
registry = installation_entry.get('registry', 'https://pypi.python.org/simple')
print(">>> Installing Python package '{package}=={version}' from '{registry}'.".format(package=installation_entry['package'], version=installation_entry['version'], registry=registry), flush=True)
args = ['pip3', 'install', '--process-dependency-links', '--upgrade', '--upgrade-strategy', 'only-if-needed', '--exists-action', 'w', '--index-url', registry, '{package}=={version}'.format(package=installation_entry['package'], version=installation_entry['version'])]
args = ['pip3', '--disable-pip-version-check', 'install', '--process-dependency-links', '--upgrade', '--upgrade-strategy', 'only-if-needed', '--exists-action', 'w', '--index-url', registry, '{package}=={version}'.format(package=installation_entry['package'], version=installation_entry['version'])]
if not can_use_process_dependency_links:
args.remove('--process-dependency-links')
docker_exec(docker_container, args)
......@@ -442,7 +442,7 @@ def validate_installation(primitive_names, interface_version, installation, anno
# Add username and password for private URIs.
package_uri = private_pip_uri_access(package_uri)
args = ['pip3', 'install', '--process-dependency-links', '--upgrade', '--upgrade-strategy', 'only-if-needed', '--exists-action', 'w', package_uri]
args = ['pip3', '--disable-pip-version-check', 'install', '--process-dependency-links', '--upgrade', '--upgrade-strategy', 'only-if-needed', '--exists-action', 'w', package_uri]
if not can_use_process_dependency_links:
args.remove('--process-dependency-links')
docker_exec(docker_container, args)
......@@ -469,7 +469,7 @@ def validate_installation(primitive_names, interface_version, installation, anno
# We install with "--editable" so that packages can have access to their git repositories.
# For example, they might need it to compute installation git commit hash for their metadata.
args = ['pip3', 'install', '--process-dependency-links', '--upgrade', '--upgrade-strategy', 'only-if-needed', '--exists-action', 'w', '--editable', package_uri]
args = ['pip3', '--disable-pip-version-check', 'install', '--process-dependency-links', '--upgrade', '--upgrade-strategy', 'only-if-needed', '--exists-action', 'w', '--editable', package_uri]
if not can_use_process_dependency_links:
args.remove('--process-dependency-links')
installation_log = docker_exec(docker_container, args)
......@@ -641,7 +641,7 @@ def validate_installation(primitive_names, interface_version, installation, anno
print(">>> Checking Python packages.", flush=True)
try:
docker_exec(docker_container, ['pip3', 'check'])
docker_exec(docker_container, ['pip3', '--disable-pip-version-check', 'check'])
except ValidationError:
print(">>> ERROR {primitive_names}: Checking Python packages failed which probably means that existing Python packages had their versions changed to incompatible versions. This is not allowed. Consider changing dependencies in your primitive to match existing Python packages' versions. Or contact existing primitves' authors to determine common versions for shared dependencies. If this does not work out, bring it to the working group to discuss fixing a version of conflicting dependencies for all primitives.".format(primitive_names=primitive_names), flush=True)
error_count += len(primitive_names)
......
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