Clarify the usage of --no-binary and --only-binary command

This commit is contained in:
cjc7373 2020-03-29 19:18:32 +08:00 committed by Xavier Fernandez
parent 019637cc67
commit c388315bc0
3 changed files with 24 additions and 12 deletions

View File

@ -934,6 +934,17 @@ Examples
$ pip install --pre SomePackage
#. Install packages from source.
Do not use any binary packages::
$ pip install SomePackage1 SomePackage2 --no-binary :all:
Specify ``SomePackage1`` to be installed from source::
$ pip install SomePackage1 SomePackage2 --no-binary SomePackage1
----
.. [1] This is true with the exception that pip v7.0 and v7.0.1 required quotes

1
news/3191.doc Normal file
View File

@ -0,0 +1 @@
Clarify the usage of --no-binary command.

View File

@ -475,12 +475,12 @@ def no_binary():
"--no-binary", dest="format_control", action="callback",
callback=_handle_no_binary, type="str",
default=format_control,
help="Do not use binary packages. Can be supplied multiple times, and "
"each time adds to the existing value. Accepts either :all: to "
"disable all binary packages, :none: to empty the set, or one or "
"more package names with commas between them (no colons). Note "
"that some packages are tricky to compile and may fail to "
"install when this option is used on them.",
help='Do not use binary packages. Can be supplied multiple times, and '
'each time adds to the existing value. Accepts either ":all:" to '
'disable all binary packages, ":none:" to empty the set (notice '
'the colons), or one or more package names with commas between '
'them (no colons). Note that some packages are tricky to compile '
'and may fail to install when this option is used on them.',
)
@ -491,12 +491,12 @@ def only_binary():
"--only-binary", dest="format_control", action="callback",
callback=_handle_only_binary, type="str",
default=format_control,
help="Do not use source packages. Can be supplied multiple times, and "
"each time adds to the existing value. Accepts either :all: to "
"disable all source packages, :none: to empty the set, or one or "
"more package names with commas between them. Packages without "
"binary distributions will fail to install when this option is "
"used on them.",
help='Do not use source packages. Can be supplied multiple times, and '
'each time adds to the existing value. Accepts either ":all:" to '
'disable all source packages, ":none:" to empty the set, or one '
'or more package names with commas between them. Packages '
'without binary distributions will fail to install when this '
'option is used on them.',
)