diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py index e65ce84c8..d7b272ef3 100644 --- a/src/pip/_internal/cli/cmdoptions.py +++ b/src/pip/_internal/cli/cmdoptions.py @@ -31,7 +31,7 @@ from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from optparse import OptionParser, Values - from typing import Any, Callable, Dict, List, Optional, Tuple + from typing import Any, Callable, Dict, Optional, Tuple from pip._internal.cli.parser import ConfigOptionParser @@ -498,8 +498,8 @@ platform = partial( action='append', default=None, help=("Only use wheels compatible with . Defaults to the " - "platform of the running system. Use multiple options to specify " - "multiple platforms supported by the target interpreter."), + "platform of the running system. Use this option multiple times to " + "specify multiple platforms supported by the target interpreter."), ) # type: Callable[..., Option] @@ -592,8 +592,8 @@ abi = partial( default=None, help=("Only use wheels compatible with Python abi , e.g. 'pypy_41'. " "If not specified, then the current interpreter abi tag is used. " - "Use multiple options to specify multiple abis supported by the " - "target interpreter. Generally you will need to specify " + "Use this option multiple times to specify multiple abis supported " + "by the target interpreter. Generally you will need to specify " "--implementation, --platform, and --python-version when using this " "option."), ) # type: Callable[..., Option] diff --git a/tests/functional/test_download.py b/tests/functional/test_download.py index 3291d580d..2eee51b08 100644 --- a/tests/functional/test_download.py +++ b/tests/functional/test_download.py @@ -309,6 +309,21 @@ def test_download_specify_platform(script, data): Path('scratch') / 'fake-2.0-py2.py3-none-linux_x86_64.whl' ) + # Test with multiple supported platforms specified. + data.reset() + fake_wheel(data, 'fake-3.0-py2.py3-none-linux_x86_64.whl') + result = script.pip( + 'download', '--no-index', '--find-links', data.find_links, + '--only-binary=:all:', + '--dest', '.', + '--platform', 'manylinux1_x86_64', '--platform', 'linux_x86_64', + '--platform', 'any', + 'fake==3' + ) + result.did_create( + Path('scratch') / 'fake-3.0-py2.py3-none-linux_x86_64.whl' + ) + class TestDownloadPlatformManylinuxes(object): """ @@ -575,6 +590,22 @@ def test_download_specify_abi(script, data): expect_error=True, ) + data.reset() + fake_wheel(data, 'fake-1.0-fk2-otherabi-fake_platform.whl') + result = script.pip( + 'download', '--no-index', '--find-links', data.find_links, + '--only-binary=:all:', + '--dest', '.', + '--python-version', '2', + '--implementation', 'fk', + '--platform', 'fake_platform', + '--abi', 'fakeabi', '--abi', 'otherabi', '--abi', 'none', + 'fake' + ) + result.did_create( + Path('scratch') / 'fake-1.0-fk2-otherabi-fake_platform.whl' + ) + def test_download_specify_implementation(script, data): """