Skip to content

Commit 002982f

Browse files
committed
Deprecate using setup.py bdist_wheel
1 parent 06c8024 commit 002982f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

news/13319.removal.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Deprecate the legacy ``setup.py bdist_wheel`` mechanism. To silence the warning,
2+
and future-proof their setup, users should enable ``--use-pep517`` or add a
3+
``pyproject.toml`` file to the projects they control.

src/pip/_internal/operations/build/wheel_legacy.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import List, Optional
44

55
from pip._internal.cli.spinners import open_spinner
6+
from pip._internal.utils.deprecation import deprecated
67
from pip._internal.utils.setuptools_build import make_setuptools_bdist_wheel_args
78
from pip._internal.utils.subprocess import call_subprocess, format_command_args
89

@@ -68,6 +69,21 @@ def build_wheel_legacy(
6869
6970
Returns path to wheel if successfully built. Otherwise, returns None.
7071
"""
72+
deprecated(
73+
reason=(
74+
f"Building {name!r} using the legacy setup.py bdist_wheel mechanism, "
75+
"which will be removed in a future version."
76+
),
77+
replacement=(
78+
"to use the standardized build interface by "
79+
"setting the `--use-pep517` option, "
80+
"(possibly combined with `--no-build-isolation`), "
81+
f"or adding a `pyproject.toml` file to the source tree of {name!r}"
82+
),
83+
gone_in="25.3",
84+
issue=6334,
85+
)
86+
7187
wheel_args = make_setuptools_bdist_wheel_args(
7288
setup_py_path,
7389
global_options=global_options,

0 commit comments

Comments
 (0)