diff --git a/news/7340.bugfix b/news/7340.bugfix new file mode 100644 index 000000000..ca6332d17 --- /dev/null +++ b/news/7340.bugfix @@ -0,0 +1,2 @@ +Fix typo in warning message when any of ``--build-option``, ``--global-option`` +and ``--install-option`` is used in requirements.txt diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py index d7c6e34b2..6e4d0eac5 100644 --- a/src/pip/_internal/cli/cmdoptions.py +++ b/src/pip/_internal/cli/cmdoptions.py @@ -83,8 +83,8 @@ def check_install_build_global(options, check_options=None): control = options.format_control control.disallow_binaries() warnings.warn( - 'Disabling all use of wheels due to the use of --build-options ' - '/ --global-options / --install-options.', stacklevel=2, + 'Disabling all use of wheels due to the use of --build-option ' + '/ --global-option / --install-option.', stacklevel=2, ) diff --git a/src/pip/_internal/wheel_builder.py b/src/pip/_internal/wheel_builder.py index f1383a466..73e178bda 100644 --- a/src/pip/_internal/wheel_builder.py +++ b/src/pip/_internal/wheel_builder.py @@ -345,7 +345,7 @@ class WheelBuilder(object): if self.build_options: # PEP 517 does not support --build-options logger.error('Cannot build wheel for %s using PEP 517 when ' - '--build-options is present' % (req.name,)) + '--build-option is present' % (req.name,)) return None try: logger.debug('Destination directory: %s', tempd) diff --git a/tests/functional/test_pep517.py b/tests/functional/test_pep517.py index faff843dc..37ef54dec 100644 --- a/tests/functional/test_pep517.py +++ b/tests/functional/test_pep517.py @@ -214,4 +214,4 @@ def test_pep517_and_build_options(script, tmpdir, data, common_wheels): expect_error=True ) assert 'Cannot build wheel' in result.stderr - assert 'when --build-options is present' in result.stderr + assert 'when --build-option is present' in result.stderr