Skip to content

Commit d091260

Browse files
committed
Respond to feedback, and add functional tests.
1 parent 699ad9c commit d091260

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

src/pip/_internal/cli/cmdoptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ def only_binary():
497497
action='append',
498498
default=None,
499499
help=("Only use wheels compatible with <platform>. Defaults to the "
500-
"platform of the running system. Use multiple options to specify "
501-
"multiple platforms supported by the target interpreter."),
500+
"platform of the running system. Use this option multiple times to "
501+
"specify multiple platforms supported by the target interpreter."),
502502
) # type: Callable[..., Option]
503503

504504

@@ -591,8 +591,8 @@ def _handle_python_version(option, opt_str, value, parser):
591591
default=None,
592592
help=("Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. "
593593
"If not specified, then the current interpreter abi tag is used. "
594-
"Use multiple options to specify multiple abis supported by the "
595-
"target interpreter. Generally you will need to specify "
594+
"Use this option multiple times to specify multiple abis supported "
595+
"by the target interpreter. Generally you will need to specify "
596596
"--implementation, --platform, and --python-version when using this "
597597
"option."),
598598
) # type: Callable[..., Option]

tests/functional/test_download.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,21 @@ def test_download_specify_platform(script, data):
309309
Path('scratch') / 'fake-2.0-py2.py3-none-linux_x86_64.whl'
310310
)
311311

312+
# Test with multiple supported platforms specified.
313+
data.reset()
314+
fake_wheel(data, 'fake-3.0-py2.py3-none-linux_x86_64.whl')
315+
result = script.pip(
316+
'download', '--no-index', '--find-links', data.find_links,
317+
'--only-binary=:all:',
318+
'--dest', '.',
319+
'--platform', 'manylinux1_x86_64', '--platform', 'linux_x86_64',
320+
'--platform', 'any',
321+
'fake==3'
322+
)
323+
result.did_create(
324+
Path('scratch') / 'fake-3.0-py2.py3-none-linux_x86_64.whl'
325+
)
326+
312327

313328
class TestDownloadPlatformManylinuxes(object):
314329
"""
@@ -575,6 +590,22 @@ def test_download_specify_abi(script, data):
575590
expect_error=True,
576591
)
577592

593+
data.reset()
594+
fake_wheel(data, 'fake-1.0-fk2-otherabi-fake_platform.whl')
595+
result = script.pip(
596+
'download', '--no-index', '--find-links', data.find_links,
597+
'--only-binary=:all:',
598+
'--dest', '.',
599+
'--python-version', '2',
600+
'--implementation', 'fk',
601+
'--platform', 'fake_platform',
602+
'--abi', 'fakeabi', '--abi', 'otherabi', '--abi', 'none',
603+
'fake'
604+
)
605+
result.did_create(
606+
Path('scratch') / 'fake-1.0-fk2-otherabi-fake_platform.whl'
607+
)
608+
578609

579610
def test_download_specify_implementation(script, data):
580611
"""

0 commit comments

Comments
 (0)