Skip to main content

Select PIP version to use with tox

Project description

This is a tox plugin that preinstalls a specific version of pip in each tox environment.

This works around the default behavior of tox/virtualenv that always installs the latest version pip. It is an improvment over the VIRTUALENV_NO_DOWNLOAD=1 option that does not install the latest version, but could result in usage of an outdated version of pip.

Recommendation: Do not pin the pip version long term. You get more stable repeatable builds, but at the cost of using an outdated (possibly vulnerable) package. This should be used as a temporary fix for breakages in upstream pip, or in conjunction with a regular process to update the version pin.

### Usage

Install the package and include pip_version in your tox.ini

`tox [testenv] pip_version = 19.0.1 `

Or, set the TOX_PIP_VERSION environment variable,

`bash export TOX_PIP_VERSION=18.1 tox `

The plugin will install that specific pip into the tox-created virtualenv, just after tox creates the virtualenv, but before dependencies are installed.

The pip_version within tox.ini, if present, is always used over the environment variable.

If neither pip_version or TOX_PIP_VERSION is present, the plugin does nothing.

### Tests

Use make test to run the tests, which includes linting and functional tests.

Each of the tests/* directories is a “feature” that needs testing. Each feature sub-directory contains a tox.ini file that sets pip version in a particular way, and then uses a tox command to check the correct pip version was installed.

Project details


Download files

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

Source Distribution

tox-pip-version-0.0.1.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file tox-pip-version-0.0.1.tar.gz.

File metadata

  • Download URL: tox-pip-version-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.2

File hashes

Hashes for tox-pip-version-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5b022e1986cca8494d3b12e2f64801128c187d85d5c9da53e1f6100a799aac89
MD5 5a95dda1d6e6d04e1d3aeeded724b6ff
BLAKE2b-256 19f7326447016a3e525afc99889e100899179a6647114b30f4f3e58c8de2fb7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page