Skip to content

Commit

Permalink
Clarify the usage of --no-binary and --only-binary command
Browse files Browse the repository at this point in the history
  • Loading branch information
cjc7373 authored and xavfernandez committed Mar 30, 2020
1 parent 019637c commit c388315
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
11 changes: 11 additions & 0 deletions docs/html/reference/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions news/3191.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify the usage of --no-binary command.
24 changes: 12 additions & 12 deletions src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
)


Expand All @@ -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.',
)


Expand Down

0 comments on commit c388315

Please sign in to comment.