Skip to content

Commit a8b8d4d

Browse files
authored
Document how to install provides_extras from local wheel file (#9698)
1 parent 239a307 commit a8b8d4d

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/html/user_guide.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Specifiers`
5353
5454
py -m pip install SomePackage # latest version
5555
py -m pip install SomePackage==1.0.4 # specific version
56-
py -m pip install 'SomePackage>=1.0.4' # minimum version
56+
py -m pip install 'SomePackage>=1.0.4' # minimum version
5757
5858
For more information and examples, see the :ref:`pip install` reference.
5959

@@ -271,6 +271,26 @@ To install directly from a wheel archive:
271271
272272
py -m pip install SomePackage-1.0-py2.py3-none-any.whl
273273
274+
To include optional dependencies provided in the ``provides_extras``
275+
metadata in the wheel, you must add quotes around the install target
276+
name:
277+
278+
.. tab:: Unix/macOS
279+
280+
.. code-block:: shell
281+
282+
python -m pip install './somepackage-1.0-py2.py3-none-any.whl[my-extras]'
283+
284+
.. tab:: Windows
285+
286+
.. code-block:: shell
287+
288+
py -m pip install './somepackage-1.0-py2.py3-none-any.whl[my-extras]'
289+
290+
.. note::
291+
292+
In the future, the ``path[extras]`` syntax may become deprecated. It is
293+
recommended to use PEP 508 syntax wherever possible.
274294

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

0 commit comments

Comments
 (0)