File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
src/pip/_internal/operations/build Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change 3
3
from typing import List , Optional
4
4
5
5
from pip ._internal .cli .spinners import open_spinner
6
+ from pip ._internal .utils .deprecation import deprecated
6
7
from pip ._internal .utils .setuptools_build import make_setuptools_bdist_wheel_args
7
8
from pip ._internal .utils .subprocess import call_subprocess , format_command_args
8
9
@@ -68,6 +69,21 @@ def build_wheel_legacy(
68
69
69
70
Returns path to wheel if successfully built. Otherwise, returns None.
70
71
"""
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
+
71
87
wheel_args = make_setuptools_bdist_wheel_args (
72
88
setup_py_path ,
73
89
global_options = global_options ,
You can’t perform that action at this time.
0 commit comments