Skip to content

Commit 14c9fd5

Browse files
committed
Use run_with_spinner_message() for "setup.py install"
1 parent d61292b commit 14c9fd5

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/pip/_internal/req/req_install.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
)
5555
from pip._internal.utils.temp_dir import TempDirectory
5656
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
57-
from pip._internal.utils.ui import open_spinner
5857
from pip._internal.utils.virtualenv import running_under_virtualenv
5958
from pip._internal.vcs import vcs
6059

@@ -930,15 +929,15 @@ def install(
930929
install_args = self.get_install_args(
931930
global_options, record_filename, root, prefix, pycompile,
932931
)
933-
msg = 'Running setup.py install for %s' % (self.name,)
934-
with open_spinner(msg) as spinner:
935-
with indent_log():
936-
with self.build_env:
937-
call_subprocess(
938-
install_args + install_options,
939-
cwd=self.unpacked_source_directory,
940-
spinner=spinner,
941-
)
932+
933+
runner = run_with_spinner_message(
934+
"Running setup.py install for {}".format(self.name)
935+
)
936+
with indent_log(), self.build_env:
937+
runner(
938+
cmd=install_args + install_options,
939+
cwd=self.unpacked_source_directory,
940+
)
942941

943942
if not os.path.exists(record_filename):
944943
logger.debug('Record file %s not found', record_filename)

0 commit comments

Comments
 (0)