Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document constraints.txt usage. #585

Merged
merged 5 commits into from
Aug 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
where they are not used.
- #326: Fix OSError 'Not a directory' when creating env on Jython 2.7.0.
Thanks Nick Douma (@LordGaav).
- #585: Add documentation for constraints.txt

2.7.0
-----
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Nick Douma
Cyril Roelandt
Bartolome Sanchez Salado
Laszlo Vasko
Alexander Loechel
32 changes: 25 additions & 7 deletions doc/example/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,38 @@ configuration::

.. _multiindex:

depending on requirements.txt
depending on requirements.txt or defining constraints
-----------------------------------------------

.. versionadded:: 1.6.1

(experimental) If you have a ``requirements.txt`` file
you can add it to your ``deps`` variable like this::
(experimental) If you have a ``requirements.txt`` file or a ``constraints.txt`` file you can add it to your ``deps`` variable like this:

.. code-block:: ini

deps = -rrequirements.txt

All installation commands are executed using ``{toxinidir}``
(the directory where ``tox.ini`` resides) as the current
working directory. Therefore, the underlying ``pip`` installation
will assume ``requirements.txt`` to exist at ``{toxinidir}/requirements.txt``.
or

.. code-block:: ini

deps = -cconstraints.txt

or

.. code-block:: ini

deps = -rrequirements.txt -cconstraints.txt

All installation commands are executed using ``{toxinidir}`` (the directory where ``tox.ini`` resides) as the current working directory.
Therefore, the underlying ``pip`` installation will assume ``requirements.txt`` or ``constraints.txt`` to exist at ``{toxinidir}/requirements.txt`` or ``{toxinidir}/contrains.txt``.

This is actually a side effect that all elements of the dependency list is directly passed to ``pip``.

For more details on ``requirements.txt`` files or ``constraints.txt`` files please see:

* https://pip.pypa.io/en/stable/user_guide/#requirements-files
* https://pip.pypa.io/en/stable/user_guide/#constraints-files

using a different default PyPI url
-----------------------------------------------
Expand Down