Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest Tox isolated_build w/o poetry install #2416

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,24 @@ The `^` operator works very well with libraries following [semantic versioning](
Yes. By using the [isolated builds](https://tox.readthedocs.io/en/latest/config.html#conf-isolated_build) `tox` provides,
you can use it in combination with the PEP 517 compliant build system provided by Poetry.

So, in your `pyproject.toml` file, add this section if it does not already exist:
In your `pyproject.toml` file, ensure that the following section is present:

```toml
[build-system]
requires = ["poetry>=0.12"]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
```

And use a `tox.ini` configuration file similar to this:
Use a `tox.ini` configuration file similar to this:

```INI
```ini
[tox]
envlist = py36, py37
isolated_build = true
envlist = py27, py36

[testenv]
whitelist_externals = poetry
commands =
poetry install -v
poetry run pytest tests/
deps = pytest
commands = pytest {posargs}
```

## I don't want Poetry to manage my virtual environments. Can I disable it?
Expand All @@ -68,6 +66,6 @@ and is an overhead, like when working with containers.

In this case, you can disable this feature by setting the `virtualenvs.create` setting to `false`:

```bash
```console
poetry config virtualenvs.create false
```