Skip to content

Commit 5a193a2

Browse files
committed
Deprecate --build-option and --global-option
1 parent 4b14e7c commit 5a193a2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

news/11859.removal.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Deprecate ``--build-option`` and ``--global-option``. Users are invited to switch to
2+
``--config-settings``.

src/pip/_internal/req/req_install.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,17 @@ def check_legacy_setup_py_options(
922922
if not legacy_setup_py_options_present:
923923
return
924924

925+
deprecated(
926+
reason="--build-option and --global-option are deprecated.",
927+
issue=11859,
928+
replacement="to use --config-settings",
929+
gone_in="23.3",
930+
)
931+
925932
options.format_control.disallow_binaries()
926933
logger.warning(
927934
"Implying --no-binary=:all: due to the presence of "
928935
"--build-option / --global-option / --install-option. "
929-
"Consider using --config-settings for more flexibility.",
930936
)
931937
if mode == LegacySetupPyOptionsCheckMode.INSTALL and has_install_options:
932938
if _install_option_ignored(options.install_options, reqs):

0 commit comments

Comments
 (0)