Skip to content

Commit 3bbf6e9

Browse files
authored
Merge pull request #10485 from pradyunsg/drop-build-dir
2 parents e1dd4b4 + 62ead58 commit 3bbf6e9

File tree

7 files changed

+1
-61
lines changed

7 files changed

+1
-61
lines changed

news/10485.removal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove the ``--build-dir`` option and aliases, one last time.

src/pip/_internal/cli/base_command.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
PreviousBuildDirError,
2828
UninstallationError,
2929
)
30-
from pip._internal.utils.deprecation import deprecated
3130
from pip._internal.utils.filesystem import check_path_owner
3231
from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging
3332
from pip._internal.utils.misc import get_prog, normalize_path
@@ -149,20 +148,6 @@ def _main(self, args: List[str]) -> int:
149148
)
150149
options.cache_dir = None
151150

152-
if getattr(options, "build_dir", None):
153-
deprecated(
154-
reason=(
155-
"The -b/--build/--build-dir/--build-directory "
156-
"option is deprecated and has no effect anymore."
157-
),
158-
replacement=(
159-
"use the TMPDIR/TEMP/TMP environment variable, "
160-
"possibly combined with --no-clean"
161-
),
162-
gone_in="21.3",
163-
issue=8333,
164-
)
165-
166151
if "2020-resolver" in options.features_enabled:
167152
logger.warning(
168153
"--use-feature=2020-resolver no longer has any effect, "

src/pip/_internal/cli/cmdoptions.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -731,18 +731,6 @@ def _handle_no_cache_dir(
731731
help="Don't install package dependencies.",
732732
)
733733

734-
build_dir: Callable[..., Option] = partial(
735-
PipOption,
736-
"-b",
737-
"--build",
738-
"--build-dir",
739-
"--build-directory",
740-
dest="build_dir",
741-
type="path",
742-
metavar="dir",
743-
help=SUPPRESS_HELP,
744-
)
745-
746734
ignore_requires_python: Callable[..., Option] = partial(
747735
Option,
748736
"--ignore-requires-python",

src/pip/_internal/commands/download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class DownloadCommand(RequirementCommand):
3737
def add_options(self) -> None:
3838
self.cmd_opts.add_option(cmdoptions.constraints())
3939
self.cmd_opts.add_option(cmdoptions.requirements())
40-
self.cmd_opts.add_option(cmdoptions.build_dir())
4140
self.cmd_opts.add_option(cmdoptions.no_deps())
4241
self.cmd_opts.add_option(cmdoptions.global_options())
4342
self.cmd_opts.add_option(cmdoptions.no_binary())

src/pip/_internal/commands/install.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ def add_options(self) -> None:
135135
),
136136
)
137137

138-
self.cmd_opts.add_option(cmdoptions.build_dir())
139-
140138
self.cmd_opts.add_option(cmdoptions.src())
141139

142140
self.cmd_opts.add_option(

src/pip/_internal/commands/wheel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def add_options(self) -> None:
6565
self.cmd_opts.add_option(cmdoptions.src())
6666
self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
6767
self.cmd_opts.add_option(cmdoptions.no_deps())
68-
self.cmd_opts.add_option(cmdoptions.build_dir())
6968
self.cmd_opts.add_option(cmdoptions.progress_bar())
7069

7170
self.cmd_opts.add_option(

tests/functional/test_wheel.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import re
44
import sys
5-
from os.path import exists
65

76
import pytest
87

@@ -240,35 +239,6 @@ def test_pip_wheel_fail(script, data):
240239
assert result.returncode != 0
241240

242241

243-
def test_no_clean_option_blocks_cleaning_after_wheel(
244-
script,
245-
data,
246-
resolver_variant,
247-
):
248-
"""
249-
Test --no-clean option blocks cleaning after wheel build
250-
"""
251-
build = script.venv_path / "build"
252-
result = script.pip(
253-
"wheel",
254-
"--no-clean",
255-
"--no-index",
256-
"--build",
257-
build,
258-
f"--find-links={data.find_links}",
259-
"simple",
260-
expect_temp=True,
261-
# TODO: allow_stderr_warning is used for the --build deprecation,
262-
# remove it when removing support for --build
263-
allow_stderr_warning=True,
264-
)
265-
266-
if resolver_variant == "legacy":
267-
build = build / "simple"
268-
message = f"build/simple should still exist {result}"
269-
assert exists(build), message
270-
271-
272242
def test_pip_wheel_source_deps(script, data):
273243
"""
274244
Test 'pip wheel' finds and builds source archive dependencies

0 commit comments

Comments
 (0)