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.
Release files for tox-pypi-filter 0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tox_pypi_filter-0.15.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tox_pypi_filter-0.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / tox_pypi_filter-0.15.tar.gz
| Download URL | tox_pypi_filter-0.15.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44900cce4ac3e9b87afb0b2c784f309c6522609b1aea9cb7ab6c1de8a078cbd8
|
|
BLAKE2b-256 checksum How to use checksums |
0f839d52fbbb41f22921017257dc29047e4d46f76419591b2db5842cef24a4a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / tox_pypi_filter-0.15-py3-none-any.whl
| Download URL | tox_pypi_filter-0.15-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
329861f067900fb0eb169236fd8a40213295ee907c7cc257c8804806b46be330
|
|
BLAKE2b-256 checksum How to use checksums |
36975935dab17d41172a2e92e4ec3532c9bbb5ac29a92e31b4d893324244c99b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|