Skip to main content

Implement a --pypi-filter option for tox

Project description


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.


To install:

pip install tox-pypi-filter


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.


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.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tox-pypi-filter, version 0.13
Filename, size File type Python version Upload date Hashes
Filename, size tox_pypi_filter-0.13-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tox-pypi-filter-0.13.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page