Document how to install provides_extras from local wheel file
@@ -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.
