https://github.com/astrofrog/tox-pypi-filter
Plugin for tox to allow dependency filtering at the PyPI server level
https://github.com/astrofrog/tox-pypi-filter
Last synced: 18 days ago
JSON representation
Plugin for tox to allow dependency filtering at the PyPI server level
- Host: GitHub
- URL: https://github.com/astrofrog/tox-pypi-filter
- Owner: astrofrog
- License: bsd-2-clause
- Created: 2019-08-29T10:35:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-09T11:26:13.000Z (over 3 years ago)
- Last Synced: 2025-01-04T03:30:35.306Z (over 1 year ago)
- Language: Python
- Size: 43.9 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
About tox-pypi-filter
=====================
About
-----
Tox includes a ``--force-dep`` option that can be used to provide version
restrictions for dependencies - however, by design this only works with
dependencies explicitly listed in the ``deps`` section of the ``tox.ini`` file
(see `this issue `_ for a
discussion of this).
The **tox-pypi-filter** plugin works around this by using a proxy PyPI server
that filters packages in a way that is independent of tox's implementation.
Installing
----------
To install::
pip install tox-pypi-filter
Using
-----
This plugin provides a ``--pypi-filter`` command-line option that takes
`PEP440 version specifiers
`_ separated by
semicolons, e.g.::
tox --pypi-filter "numpy==1.14.*;pytest<4" -e py37-test
In this case, if Numpy or PyTest are needed by the tox environment, the versions
that will be installed will satisfy the version specification supplied.
Caveats
-------
This plugin will not work properly if you use the ``-i/--index-url`` option
manually when calling tox. In addition, this will only work with pip-based
installs, and will not work with e.g. `tox-conda
`_.