From 1a55dec37893f471d6135a3606a0db40723bfc64 Mon Sep 17 00:00:00 2001 From: stephsamson Date: Sun, 5 Apr 2020 14:26:50 +0200 Subject: [PATCH 1/4] Add documentation on inline tables in include. Resolves: Core #8. --- docs/docs/pyproject.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/docs/pyproject.md b/docs/docs/pyproject.md index 14221b8b03a..fe5f850b85a 100644 --- a/docs/docs/pyproject.md +++ b/docs/docs/pyproject.md @@ -173,6 +173,17 @@ If a VCS is being used for a package, the exclude field will be seeded with the include = ["CHANGELOG.md"] ``` +You can also use inline tables for `include`: + +```toml +[tool.poetry] +# ... +include = [ + { path = "tests", format = "sdist" }, + { path = "for_wheel.txt", format = "wheel" } +] +``` + ```toml exclude = ["my_package/excluded.py"] ``` From 1476a673cc5c2a1c92737174cf22b522d3aab567 Mon Sep 17 00:00:00 2001 From: stephsamson Date: Tue, 24 Nov 2020 13:51:43 +0100 Subject: [PATCH 2/4] Per comments. --- docs/docs/pyproject.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/pyproject.md b/docs/docs/pyproject.md index fe5f850b85a..c5160b8231d 100644 --- a/docs/docs/pyproject.md +++ b/docs/docs/pyproject.md @@ -173,14 +173,14 @@ If a VCS is being used for a package, the exclude field will be seeded with the include = ["CHANGELOG.md"] ``` -You can also use inline tables for `include`: +You can also specify the formats for which these patterns have to be included, as shown here: ```toml [tool.poetry] # ... include = [ { path = "tests", format = "sdist" }, - { path = "for_wheel.txt", format = "wheel" } + { path = "for_wheel.txt", format = ["sdist", "wheel"] } ] ``` From e6f4d7fd1716664601a994c1e5f71c7e88d065f7 Mon Sep 17 00:00:00 2001 From: stephsamson Date: Fri, 27 Nov 2020 13:10:51 +0100 Subject: [PATCH 3/4] Specify default for inline table format. --- docs/docs/pyproject.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/pyproject.md b/docs/docs/pyproject.md index c5160b8231d..cc206281887 100644 --- a/docs/docs/pyproject.md +++ b/docs/docs/pyproject.md @@ -184,6 +184,8 @@ include = [ ] ``` +If no format is specified, it will default to include to a `wheel` only. + ```toml exclude = ["my_package/excluded.py"] ``` From 1a8f53ec40178a5cc161dc82442341a3858622c0 Mon Sep 17 00:00:00 2001 From: stephsamson Date: Fri, 27 Nov 2020 14:33:49 +0100 Subject: [PATCH 4/4] Default to both sdist and wheel --- docs/docs/pyproject.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/pyproject.md b/docs/docs/pyproject.md index cc206281887..5f514b6aff1 100644 --- a/docs/docs/pyproject.md +++ b/docs/docs/pyproject.md @@ -184,7 +184,7 @@ include = [ ] ``` -If no format is specified, it will default to include to a `wheel` only. +If no format is specified, it will default to include both `sdist` and `wheel`. ```toml exclude = ["my_package/excluded.py"]