1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Add a spinner when preparing setup.py metadata

For symmetry with pyproject.toml metadata preparation.
This commit is contained in:
Stéphane Bidoul 2021-09-25 12:00:23 +02:00
parent 74999ccf9b
commit 826d566eb8
No known key found for this signature in database
GPG key ID: BCAB2555446B5B92
2 changed files with 12 additions and 5 deletions

View file

@ -5,6 +5,7 @@ import logging
import os
from pip._internal.build_env import BuildEnvironment
from pip._internal.cli.spinners import open_spinner
from pip._internal.exceptions import InstallationError
from pip._internal.utils.setuptools_build import make_setuptools_egg_info_args
from pip._internal.utils.subprocess import call_subprocess
@ -54,11 +55,13 @@ def generate_metadata(
)
with build_env:
call_subprocess(
args,
cwd=source_dir,
command_desc="python setup.py egg_info",
)
with open_spinner("Preparing metadata (setup.py)") as spinner:
call_subprocess(
args,
cwd=source_dir,
command_desc="python setup.py egg_info",
spinner=spinner,
)
# Return the .egg-info directory.
return _find_egg_info(egg_info_dir)

View file

@ -528,6 +528,10 @@ class InstallRequirement:
# At this point we have determined that the build_editable hook
# is missing, and there is a setup.py or setup.cfg
# so we fallback to the legacy metadata generation
logger.info(
"Build backend does not support editables, "
"falling back to setup.py egg_info."
)
else:
self.supports_pyproject_editable = True
return metadata_directory