mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Deprecate --build-option and --global-option
This commit is contained in:
parent
ade38264b2
commit
6adb7af0aa
2
news/11859.removal.rst
Normal file
2
news/11859.removal.rst
Normal file
|
@ -0,0 +1,2 @@
|
|||
Deprecate ``--build-option`` and ``--global-option``. Users are invited to switch to
|
||||
``--config-settings``.
|
|
@ -894,9 +894,14 @@ def check_legacy_setup_py_options(
|
|||
has_build_options = _has_option(options, reqs, "build_options")
|
||||
has_global_options = _has_option(options, reqs, "global_options")
|
||||
if has_build_options or has_global_options:
|
||||
deprecated(
|
||||
reason="--build-option and --global-option are deprecated.",
|
||||
issue=11859,
|
||||
replacement="to use --config-settings",
|
||||
gone_in="23.3",
|
||||
)
|
||||
logger.warning(
|
||||
"Implying --no-binary=:all: due to the presence of "
|
||||
"--build-option / --global-option. "
|
||||
"Consider using --config-settings for more flexibility.",
|
||||
)
|
||||
options.format_control.disallow_binaries()
|
||||
|
|
|
@ -843,7 +843,7 @@ def test_install_global_option(script: PipTestEnvironment) -> None:
|
|||
assert "INITools==0.1\n" in result.stdout
|
||||
assert not result.files_created
|
||||
assert "Implying --no-binary=:all:" in result.stderr
|
||||
assert "Consider using --config-settings" in result.stderr
|
||||
assert "A possible replacement is to use --config-settings" in result.stderr
|
||||
|
||||
|
||||
def test_install_with_hacked_egg_info(
|
||||
|
|
Loading…
Reference in a new issue