Skip to content

Commit

Permalink
README.md: list "vendor" installation first
Browse files Browse the repository at this point in the history
It's probably _more reliable_ to just vendor the plugin in your project, so
list that method first.
  • Loading branch information
masenf committed Jan 16, 2023
1 parent 456c989 commit b2e0a0b
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,24 @@ Please vendor the plugin as described below, or you _will_ get broken.

### To always use this plugin:

#### Vendor

* copy `src/tox_ignore_env_name_mismatch.py` to the root of your project
directory as `toxfile.py`

This uses the tox4's new ["inline
plugin"](https://tox.wiki/en/latest/plugins.html#module-tox.plugin) approach
instead of relying on the provisioning system (which [can be disabled via
CLI](https://tox.wiki/en/latest/cli_interface.html#tox---no-provision)).

#### Install/provision

* Specify `requires = tox-ignore-env-name-mismatch ~= 0.2.0` in the `[tox]`
section of `tox.ini`
```
[tox]
min_version = 4.3.3
requires =
tox-ignore-env-name-mismatch ~= 0.2.0
```

This will cause `tox` to provision a new virtualenv for `tox` itself and other
dependencies named in the
Expand All @@ -35,22 +49,17 @@ environment does not meet the specification.
Pinning the plugin to a minor version is _highly recommended_ to avoid breaking
changes.

#### Vendor

* copy `src/tox_ignore_env_name_mismatch.py` to the root of your project
directory as `toxfile.py`

This uses the tox4's new ["inline
plugin"](https://tox.wiki/en/latest/plugins.html#module-tox.plugin) approach
instead of relying on the provisioning system (which [can be disabled via
CLI](https://tox.wiki/en/latest/cli_interface.html#tox---no-provision)).
NOTE: tox < 4.3.3 had [a bug](https://github.com/tox-dev/tox/issues/2862) which
prevented this type of installation.

## Example

```
[tox]
envlist = py39,py310,py311,lint,format,types
requires = tox-ignore-env-name-mismatch ~= 0.2.0
min_version = 4.3.3
requires =
tox-ignore-env-name-mismatch ~= 0.2.0
[testenv]
deps = pytest
Expand Down Expand Up @@ -111,4 +120,4 @@ To upgrade to v0.2, change `ignore_env_name_mismatch = true` to `runner = ignore

### v0.1 - 2023-01-14

Initial Release
Initial Release

0 comments on commit b2e0a0b

Please sign in to comment.