Skip to content

Commit

Permalink
Document how to install provides_extras from local wheel file (#9698)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthagen authored Jul 25, 2021
1 parent 239a307 commit a8b8d4d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/html/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Specifiers`
py -m pip install SomePackage # latest version
py -m pip install SomePackage==1.0.4 # specific version
py -m pip install 'SomePackage>=1.0.4' # minimum version
py -m pip install 'SomePackage>=1.0.4' # minimum version
For more information and examples, see the :ref:`pip install` reference.

Expand Down Expand Up @@ -271,6 +271,26 @@ To install directly from a wheel archive:
py -m pip install SomePackage-1.0-py2.py3-none-any.whl
To include optional dependencies provided in the ``provides_extras``
metadata in the wheel, you must add quotes around the install target
name:

.. tab:: Unix/macOS

.. code-block:: shell
python -m pip install './somepackage-1.0-py2.py3-none-any.whl[my-extras]'
.. tab:: Windows

.. code-block:: shell
py -m pip install './somepackage-1.0-py2.py3-none-any.whl[my-extras]'
.. note::

In the future, the ``path[extras]`` syntax may become deprecated. It is
recommended to use PEP 508 syntax wherever possible.

For the cases where wheels are not available, pip offers :ref:`pip wheel` as a
convenience, to build wheels for all your requirements and dependencies.
Expand Down

0 comments on commit a8b8d4d

Please sign in to comment.