Skip to content

Commit 98faa7e

Browse files
committed
Add example for extending the install command
1 parent 7d43251 commit 98faa7e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/faq.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ Some solutions and their drawbacks:
2323
dependencies),
2424
- use ``PIP_CONSTRAINTS`` inside :ref:`set_env` (tox will not know about the content of the constraint file and such
2525
will not trigger a rebuild of the environment when its content changes),
26-
- specify the constraint file by extending the :ref:`install_command` (tox will not know about the content of the
27-
constraint file and such will not trigger a rebuild of the environment when its content changes).
26+
- specify the constraint file by extending the :ref:`install_command` as in the following example
27+
(tox will not know about the content of the constraint file and such will not trigger a rebuild of the environment
28+
when its content changes).
29+
30+
.. code-block:: ini
31+
32+
[testenv:py39]
33+
install_command = python -m pip install {opts} {packages} -c constraints.txt
34+
extras = test
2835
2936
Note constraint files are a subset of requirement files. Therefore, it's valid to pass a constraint file wherever you
3037
can specify a requirement file.

0 commit comments

Comments
 (0)