Commit 455c0b27 by Jakub Urban Committed by GitHub

pip install --no-input everywhere (#6966)

This is an extension of
https://github.com/python-poetry/poetry/pull/6724. I think `pip install`
invoked by poetry should never ask for user input.

Motivation is that it happened to myself and a number of colleagues many
times that poetry got seemingly stuck while it was just waiting for a
user input because of a private pypi repository that needed
authentication.

I hope this is a valuable contribution to a tool I like a lot and would
like to use more and more :)
parent def1ee8f
...@@ -593,6 +593,7 @@ def get_pep517_metadata(path: Path) -> PackageInfo: ...@@ -593,6 +593,7 @@ def get_pep517_metadata(path: Path) -> PackageInfo:
"install", "install",
"--disable-pip-version-check", "--disable-pip-version-check",
"--ignore-installed", "--ignore-installed",
"--no-input",
*PEP517_META_BUILD_DEPS, *PEP517_META_BUILD_DEPS,
) )
venv.run( venv.run(
......
...@@ -46,7 +46,7 @@ class PipInstaller(BaseInstaller): ...@@ -46,7 +46,7 @@ class PipInstaller(BaseInstaller):
return return
args = ["install", "--no-deps"] args = ["install", "--no-deps", "--no-input"]
if not package.is_direct_origin() and package.source_url: if not package.is_direct_origin() and package.source_url:
assert package.source_reference is not None assert package.source_reference is not None
......
...@@ -1953,6 +1953,7 @@ def build_environment( ...@@ -1953,6 +1953,7 @@ def build_environment(
"install", "install",
"--disable-pip-version-check", "--disable-pip-version-check",
"--ignore-installed", "--ignore-installed",
"--no-input",
*poetry.pyproject.build_system.requires, *poetry.pyproject.build_system.requires,
) )
......
...@@ -1535,6 +1535,7 @@ def test_build_environment_called_build_script_specified( ...@@ -1535,6 +1535,7 @@ def test_build_environment_called_build_script_specified(
"install", "install",
"--disable-pip-version-check", "--disable-pip-version-check",
"--ignore-installed", "--ignore-installed",
"--no-input",
*extended_without_setup_poetry.pyproject.build_system.requires, *extended_without_setup_poetry.pyproject.build_system.requires,
] ]
] ]
......
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