Skip to content

Commit ddf56be

Browse files
loechelobestwalter
authored andcommitted
Document constraints.txt usage. (#585)
* document constrains.txt usage. * add myself to contributors * add changelog entry * correct documentation
1 parent 733df2f commit ddf56be

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

CHANGELOG

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
where they are not used.
1212
- #326: Fix OSError 'Not a directory' when creating env on Jython 2.7.0.
1313
Thanks Nick Douma (@LordGaav).
14+
- #585: Add documentation for constraints.txt
1415

1516
2.7.0
1617
-----

CONTRIBUTORS

+1
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ Nick Douma
4949
Cyril Roelandt
5050
Bartolome Sanchez Salado
5151
Laszlo Vasko
52+
Alexander Loechel

doc/example/basic.txt

+25-7
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,38 @@ configuration::
8282

8383
.. _multiindex:
8484

85-
depending on requirements.txt
85+
depending on requirements.txt or defining constraints
8686
-----------------------------------------------
8787

8888
.. versionadded:: 1.6.1
8989

90-
(experimental) If you have a ``requirements.txt`` file
91-
you can add it to your ``deps`` variable like this::
90+
(experimental) If you have a ``requirements.txt`` file or a ``constraints.txt`` file you can add it to your ``deps`` variable like this:
91+
92+
.. code-block:: ini
9293

9394
deps = -rrequirements.txt
9495

95-
All installation commands are executed using ``{toxinidir}``
96-
(the directory where ``tox.ini`` resides) as the current
97-
working directory. Therefore, the underlying ``pip`` installation
98-
will assume ``requirements.txt`` to exist at ``{toxinidir}/requirements.txt``.
96+
or
97+
98+
.. code-block:: ini
99+
100+
deps = -cconstraints.txt
101+
102+
or
103+
104+
.. code-block:: ini
105+
106+
deps = -rrequirements.txt -cconstraints.txt
107+
108+
All installation commands are executed using ``{toxinidir}`` (the directory where ``tox.ini`` resides) as the current working directory.
109+
Therefore, the underlying ``pip`` installation will assume ``requirements.txt`` or ``constraints.txt`` to exist at ``{toxinidir}/requirements.txt`` or ``{toxinidir}/contrains.txt``.
110+
111+
This is actually a side effect that all elements of the dependency list is directly passed to ``pip``.
112+
113+
For more details on ``requirements.txt`` files or ``constraints.txt`` files please see:
114+
115+
* https://pip.pypa.io/en/stable/user_guide/#requirements-files
116+
* https://pip.pypa.io/en/stable/user_guide/#constraints-files
99117

100118
using a different default PyPI url
101119
-----------------------------------------------

0 commit comments

Comments
 (0)