Skip to content

Commit 7d31516

Browse files
deronnaxradoering
andauthored
FAQ: remove reference to tox "isolated_build" and improve spelling (#8658)
Co-authored-by: Randy Döring <[email protected]>
1 parent 5df28eb commit 7d31516

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/faq.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ If your package will be used as an application, it might be worth to define an u
8383

8484
### Is tox supported?
8585

86-
**Yes**. By using the [isolated builds](https://tox.readthedocs.io/en/latest/config.html#conf-isolated_build) `tox` provides,
87-
you can use it in combination with the PEP 517 compliant build system provided by Poetry.
86+
**Yes**. Provided that you are using `tox` >= 4, you can use it in combination with
87+
the PEP 517 compliant build system provided by Poetry. (With tox 3, you have to set the
88+
[isolated build](https://tox.wiki/en/3.27.1/config.html#conf-isolated_build) option.)
8889

8990
So, in your `pyproject.toml` file, add this section if it does not already exist:
9091

@@ -97,10 +98,9 @@ build-backend = "poetry.core.masonry.api"
9798
`tox` can be configured in multiple ways. It depends on what should be the code under test and which dependencies
9899
should be installed.
99100

100-
#### Usecase #1
101+
#### Use case #1
101102
```ini
102103
[tox]
103-
isolated_build = true
104104

105105
[testenv]
106106
deps =
@@ -112,10 +112,9 @@ commands =
112112
`tox` will create an `sdist` package of the project and uses `pip` to install it in a fresh environment.
113113
Thus, dependencies are resolved by `pip`.
114114

115-
#### Usecase #2
115+
#### Use case #2
116116
```ini
117117
[tox]
118-
isolated_build = true
119118

120119
[testenv]
121120
allowlist_externals = poetry
@@ -126,13 +125,12 @@ commands =
126125
```
127126

128127
`tox` will create an `sdist` package of the project and uses `pip` to install it in a fresh environment.
129-
Thus, dependencies are resolved by `pip` in the first place. But afterwards we run Poetry,
128+
Thus, dependencies are resolved by `pip` in the first place. But afterward we run Poetry,
130129
which will install the locked dependencies into the environment.
131130

132-
#### Usecase #3
131+
#### Use case #3
133132
```ini
134133
[tox]
135-
isolated_build = true
136134

137135
[testenv]
138136
skip_install = true
@@ -198,7 +196,7 @@ For example, if Poetry builds a distribution for a project that uses a version t
198196

199197
### Poetry busts my Docker cache because it requires me to COPY my source files in before installing 3rd party dependencies
200198

201-
By default running `poetry install ...` requires you to have your source files present (both the "root" package and any directory path dependencies you might have).
199+
By default, running `poetry install ...` requires you to have your source files present (both the "root" package and any directory path dependencies you might have).
202200
This interacts poorly with Docker's caching mechanisms because any change to a source file will make any layers (subsequent commands in your Dockerfile) re-run.
203201
For example, you might have a Dockerfile that looks something like this:
204202

0 commit comments

Comments
 (0)