tox-pip-version


Nametox-pip-version JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/pglass/tox-pip-version
SummarySelect PIP version to use with tox
upload_time2020-03-06 21:01:35
maintainer
docs_urlNone
authorPaul Glass
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            [![Build Status](https://travis-ci.com/pglass/tox-pip-version.svg?branch=master)](https://travis-ci.com/pglass/tox-pip-version)
![](https://img.shields.io/pypi/v/tox-pip-version.svg)
![](https://img.shields.io/pypi/pyversions/tox-pip-version.svg)

Overview
--------

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

```bash
pip install tox-pip-version
```

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.

*Note*: This relies on an [unstable tox plugin interface](
https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_create).
You may experience breakage with new tox versions. If you do, please feel
free to [report the issue](https://github.com/pglass/tox-pip-version/issues/new)
on Github.

### Usage

Install the package and include `pip_version` in your tox.ini

```tox
[testenv]
pip_version = pip==19.0.1
```

Or, set the `TOX_PIP_VERSION` environment variable,

```bash
export TOX_PIP_VERSION=18.1
tox
```

The plugin will install that version of 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.

### Version Sets

Version sets/ranges are supported, enabling installation of a version of pip
matching a set of specifiers. There are two basic formats: a plain version
number, or the package name with optional [PEP440-compatible](
https://www.python.org/dev/peps/pep-0440/#version-specifiers) version
specifiers.

| tox.ini                      | effective pip command        |
| ---------------------------- | ---------------------------- |
| `pip_version = 19.0`         | `pip install -U pip==19.0`   |
| `pip_version = pip==19.0`    | `pip install -U pip==19.0`   |
| `pip_version = pip>=19.0`    | `pip install -U pip>=19.0`   |
| `pip_version = pip!=19,>18`  | `pip install -U pip!=19,>18` |
| `pip_version = pip`          | `pip install -U pip`         |

### 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.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pglass/tox-pip-version",
    "name": "tox-pip-version",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Paul Glass",
    "author_email": "pnglass@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3c/a1/49c1c3ab6140e72a3ad0439c9dded0f1dae4e5e340f573a5f081b4989b30/tox-pip-version-0.0.7.tar.gz",
    "platform": "",
    "description": "[![Build Status](https://travis-ci.com/pglass/tox-pip-version.svg?branch=master)](https://travis-ci.com/pglass/tox-pip-version)\n![](https://img.shields.io/pypi/v/tox-pip-version.svg)\n![](https://img.shields.io/pypi/pyversions/tox-pip-version.svg)\n\nOverview\n--------\n\nThis is a tox plugin that preinstalls a specific version of pip in each tox\nenvironment.\n\n```bash\npip install tox-pip-version\n```\n\nThis works around the default behavior of tox/virtualenv that always installs\nthe latest version pip. It is an improvment over the `VIRTUALENV_NO_DOWNLOAD=1`\noption that does not install the latest version, but could result in usage of\nan outdated version of pip.\n\n*Recommendation*: Do not pin the pip version long term. You get more stable\nrepeatable builds, but at the cost of using an outdated (possibly vulnerable)\npackage. This should be used as a temporary fix for breakages in upstream pip,\nor in conjunction with a regular process to update the version pin.\n\n*Note*: This relies on an [unstable tox plugin interface](\nhttps://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_create).\nYou may experience breakage with new tox versions. If you do, please feel\nfree to [report the issue](https://github.com/pglass/tox-pip-version/issues/new)\non Github.\n\n### Usage\n\nInstall the package and include `pip_version` in your tox.ini\n\n```tox\n[testenv]\npip_version = pip==19.0.1\n```\n\nOr, set the `TOX_PIP_VERSION` environment variable,\n\n```bash\nexport TOX_PIP_VERSION=18.1\ntox\n```\n\nThe plugin will install that version of pip into the tox-created virtualenv,\njust after tox creates the virtualenv, but before dependencies are installed.\n\nThe `pip_version` within tox.ini, if present, is always used over the\nenvironment variable.\n\nIf neither `pip_version` or `TOX_PIP_VERSION` is present, the plugin does\nnothing.\n\n### Version Sets\n\nVersion sets/ranges are supported, enabling installation of a version of pip\nmatching a set of specifiers. There are two basic formats: a plain version\nnumber, or the package name with optional [PEP440-compatible](\nhttps://www.python.org/dev/peps/pep-0440/#version-specifiers) version\nspecifiers.\n\n| tox.ini                      | effective pip command        |\n| ---------------------------- | ---------------------------- |\n| `pip_version = 19.0`         | `pip install -U pip==19.0`   |\n| `pip_version = pip==19.0`    | `pip install -U pip==19.0`   |\n| `pip_version = pip>=19.0`    | `pip install -U pip>=19.0`   |\n| `pip_version = pip!=19,>18`  | `pip install -U pip!=19,>18` |\n| `pip_version = pip`          | `pip install -U pip`         |\n\n### Tests\n\nUse `make test` to run the tests, which includes linting and functional tests.\n\nEach of the `tests/*` directories is a \"feature\" that needs testing. Each\nfeature sub-directory contains a tox.ini file that sets pip version in a\nparticular way, and then uses a tox command to check the correct pip version\nwas installed.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Select PIP version to use with tox",
    "version": "0.0.7",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "a92bb40a16e1f818c350828a88598c6a",
                "sha256": "fff6c54524f1826a13b39aaeba6cd6e38840e9a2efaf6e540e7caa5ff0e705eb"
            },
            "downloads": -1,
            "filename": "tox-pip-version-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "a92bb40a16e1f818c350828a88598c6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8450,
            "upload_time": "2020-03-06T21:01:35",
            "upload_time_iso_8601": "2020-03-06T21:01:35.111996Z",
            "url": "https://files.pythonhosted.org/packages/3c/a1/49c1c3ab6140e72a3ad0439c9dded0f1dae4e5e340f573a5f081b4989b30/tox-pip-version-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-03-06 21:01:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pglass",
    "github_project": "tox-pip-version",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "tox-pip-version"
}
        
Elapsed time: 0.03283s