From 247de2a9437533101aa0d2bc770514b33028f921 Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Mon, 13 Nov 2023 11:28:07 +0100 Subject: [PATCH 1/4] remove references to 'isolated_build --- docs/faq.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 46d88c1fbf5..c12255e55be 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -83,8 +83,8 @@ If your package will be used as an application, it might be worth to define an u ### Is tox supported? -**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. +**Yes**. Provided that you are using `tox` > 4, 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: @@ -100,7 +100,6 @@ should be installed. #### Usecase #1 ```ini [tox] -isolated_build = true [testenv] deps = @@ -115,7 +114,6 @@ Thus, dependencies are resolved by `pip`. #### Usecase #2 ```ini [tox] -isolated_build = true [testenv] allowlist_externals = poetry @@ -132,7 +130,6 @@ Thus, dependencies are resolved by `pip` in the first place. But afterwards we r #### Usecase #3 ```ini [tox] -isolated_build = true [testenv] skip_install = true From af67982066c767578a490e8a214fb89fd4d0e80e Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Mon, 13 Nov 2023 11:32:00 +0100 Subject: [PATCH 2/4] fix grammar in faq.md * correct spelling for "usecase" is "Use case" * correct spelling for "afterwards" is "afterward" in American English * "by default" must be followed by a comma (https://englishplus.com/grammar/00000074.htm) --- docs/faq.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index c12255e55be..6590d2b8355 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -97,7 +97,7 @@ build-backend = "poetry.core.masonry.api" `tox` can be configured in multiple ways. It depends on what should be the code under test and which dependencies should be installed. -#### Usecase #1 +#### Use case #1 ```ini [tox] @@ -111,7 +111,7 @@ commands = `tox` will create an `sdist` package of the project and uses `pip` to install it in a fresh environment. Thus, dependencies are resolved by `pip`. -#### Usecase #2 +#### Use case #2 ```ini [tox] @@ -124,10 +124,10 @@ commands = ``` `tox` will create an `sdist` package of the project and uses `pip` to install it in a fresh environment. -Thus, dependencies are resolved by `pip` in the first place. But afterwards we run Poetry, +Thus, dependencies are resolved by `pip` in the first place. But afterward we run Poetry, which will install the locked dependencies into the environment. -#### Usecase #3 +#### Use case #3 ```ini [tox] @@ -195,7 +195,7 @@ For example, if Poetry builds a distribution for a project that uses a version t ### Poetry busts my Docker cache because it requires me to COPY my source files in before installing 3rd party dependencies -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). +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). 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. For example, you might have a Dockerfile that looks something like this: From 98e5f14bb4174eede21e7e9cb6cbd0ffc57b7a0f Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Mon, 8 Jan 2024 17:09:03 +0100 Subject: [PATCH 3/4] Update docs/faq.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Randy Döring <30527984+radoering@users.noreply.github.com> --- docs/faq.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 6590d2b8355..daca15d90aa 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -83,8 +83,9 @@ If your package will be used as an application, it might be worth to define an u ### Is tox supported? -**Yes**. Provided that you are using `tox` > 4, you can use it in combination with the PEP 517 compliant build system -provided by Poetry. +**Yes**. Provided that you are using `tox` >= 4, you can use it in combination with +the PEP 517 compliant build system provided by Poetry. (With tox 3, you have to set the +[isolated build](https://tox.wiki/en/3.27.1/config.html#conf-isolated_build) option.) So, in your `pyproject.toml` file, add this section if it does not already exist: From 101d57560776eda0b60ceef1c4981f3088d693f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:00:44 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 050622fc616..a9404955c01 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -84,7 +84,7 @@ If your package will be used as an application, it might be worth to define an u ### Is tox supported? **Yes**. Provided that you are using `tox` >= 4, you can use it in combination with -the PEP 517 compliant build system provided by Poetry. (With tox 3, you have to set the +the PEP 517 compliant build system provided by Poetry. (With tox 3, you have to set the [isolated build](https://tox.wiki/en/3.27.1/config.html#conf-isolated_build) option.) So, in your `pyproject.toml` file, add this section if it does not already exist: