mirror of https://github.com/pypa/pip
Do not update `no_clean` option value on PreviousBuildDirError
Since a recent refactoring of our temporary directory handling, `no_clean` is only read prior to these `except` blocks. Since it's not needed, remove it!
This commit is contained in:
parent
40523794d8
commit
ccc6d77a73
|
@ -23,11 +23,7 @@ from pip._internal.cli import cmdoptions
|
|||
from pip._internal.cli.cmdoptions import make_target_python
|
||||
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
|
||||
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
||||
from pip._internal.exceptions import (
|
||||
CommandError,
|
||||
InstallationError,
|
||||
PreviousBuildDirError,
|
||||
)
|
||||
from pip._internal.exceptions import CommandError, InstallationError
|
||||
from pip._internal.locations import distutils_scheme
|
||||
from pip._internal.operations.check import check_install_conflicts
|
||||
from pip._internal.req import install_given_reqs
|
||||
|
@ -438,9 +434,6 @@ class InstallCommand(RequirementCommand):
|
|||
logger.error(message, exc_info=show_traceback)
|
||||
|
||||
return ERROR
|
||||
except PreviousBuildDirError:
|
||||
options.no_clean = True
|
||||
raise
|
||||
|
||||
if options.target_dir:
|
||||
self._handle_target_dir(
|
||||
|
|
|
@ -12,7 +12,7 @@ import shutil
|
|||
from pip._internal.cache import WheelCache
|
||||
from pip._internal.cli import cmdoptions
|
||||
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
|
||||
from pip._internal.exceptions import CommandError, PreviousBuildDirError
|
||||
from pip._internal.exceptions import CommandError
|
||||
from pip._internal.req.req_tracker import get_requirement_tracker
|
||||
from pip._internal.utils.misc import ensure_dir, normalize_path
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
|
@ -127,7 +127,7 @@ class WheelCommand(RequirementCommand):
|
|||
with get_requirement_tracker() as req_tracker, TempDirectory(
|
||||
options.build_dir, delete=build_delete, kind="wheel"
|
||||
) as directory:
|
||||
try:
|
||||
if True: # Keep block indented temporarily, for a cleaner commit
|
||||
reqs = self.get_requirements(
|
||||
args, options, finder, session,
|
||||
wheel_cache
|
||||
|
@ -186,6 +186,3 @@ class WheelCommand(RequirementCommand):
|
|||
raise CommandError(
|
||||
"Failed to build one or more wheels"
|
||||
)
|
||||
except PreviousBuildDirError:
|
||||
options.no_clean = True
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue