Skip to content

Commit 4c54553

Browse files
committed
Deprecate using setup.py bdist_wheel
1 parent 06c8024 commit 4c54553

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-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: 13 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,18 @@ def build_wheel_legacy(
6869
6970
Returns path to wheel if successfully built. Otherwise, returns None.
7071
"""
72+
deprecated(
73+
reason=f"Building {name!r} using the legacy setup.py bdist_wheel mechanism.",
74+
replacement=(
75+
"to use the standardized build interface by "
76+
"setting the `--use-pep517` option, "
77+
"(possibly combined with `--no-build-isolation`), "
78+
"or adding a `pyproject.toml` file to the source tree"
79+
),
80+
gone_in="25.3",
81+
issue=6334,
82+
)
83+
7184
wheel_args = make_setuptools_bdist_wheel_args(
7285
setup_py_path,
7386
global_options=global_options,

0 commit comments

Comments
 (0)