Skip to content

Commit 8a385d7

Browse files
committed
docs: Explain use of auto-provisioning for required plugins
Signed-off-by: Stephen Finucane <[email protected]>
1 parent b04837f commit 8a385d7

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ As tool
55
-------
66

77
:pypi:`tox` is a CLI tool that needs a Python interpreter (version 3.9 or higher) to run. We recommend either
8-
:pypi:`pipx` or :pypi:`uv` to install tox into an isolated environment. This has the added benefit that later you'll
8+
:pypi:`pipx` or :pypi:`uv` to install tox into an isolated environment. This has the added benefit that later you'll
99
be able to upgrade tox without affecting other parts of the system. We provide method for ``pip`` too here but we
1010
discourage that path if you can:
1111

docs/plugins.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ For users
66

77
Many plugins are available for tox. These includes, but are not limited to, the extensions found on the ``tox-dev`` org on ':gh:`GitHub <tox-dev>`.
88

9+
Plugins are automatically discovered once from the Python environment that tox itself is installed in. This means that
10+
if tox is installed in an isolated environment (e.g. when installed using :pypi:`pipx` or :pypi:`uv`), the plugin(s) be
11+
installed in the same environment. To ensure a plugin is always available, you can include the plugin is listed in
12+
:ref:`requires`, which will cause tox to auto-provision a new isolated environment with both tox and the plugin(s)
13+
installed. For example:
14+
15+
.. tab:: TOML
16+
17+
.. code-block:: toml
18+
19+
requires = ["tox>=4", "tox-uv>=1"]
20+
21+
.. tab:: INI
22+
23+
.. code-block:: ini
24+
25+
[tox]
26+
requires =
27+
tox>=4
28+
tox-uv>=1
29+
30+
For more information, refer to :ref:`the user guide <auto-provisioning>`.
31+
932
For developers
1033
--------------
1134

docs/user_guide.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ you want to do more research, we recommend taking a look at these projects:
382382
- `Invoke <https://www.pyinvoke.org/>`__ is a general-purpose task execution library, similar to Make. Invoke is far
383383
more general-purpose than tox but it does not contain the Python testing-specific features that tox specializes in.
384384

385+
.. _auto-provisioning:
385386

386387
Auto-provisioning
387388
-----------------

0 commit comments

Comments
 (0)