From 8b063029247b4d88c243140c2c385c35a659047d Mon Sep 17 00:00:00 2001 From: Wagner Macedo Date: Sat, 13 Nov 2021 08:19:09 +0100 Subject: [PATCH 1/2] Add docs for multiple readme files support Resolves #873 Related to python-poetry/poetry-core#118 --- docs/pyproject.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/pyproject.md b/docs/pyproject.md index 96c40280e40..73900c092db 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -73,6 +73,29 @@ The readme file of the package. **Optional** The file can be either `README.rst` or `README.md`. +```toml +[tool.poetry] +# ... +readme = "README.rst" +``` + +If you want to use multiple readme files, you can by wrapping the files in a list. + +```toml +[tool.poetry] +# ... +readme = [ + "README.rst", + "CHANGELOG.rst" +] +``` + +{{% note %}} +Note that a line break (`\n`) will be added between each file in the generated readme. + +Additionally, all the listed files must be of same type, i.e. you cannot mix `.rst` and `.md`. +{{% /note %}} + ## homepage An URL to the website of the project. **Optional** From f22529dab4f393ead0e259fe78b8a35806a1c686 Mon Sep 17 00:00:00 2001 From: Wagner Macedo Date: Fri, 19 Nov 2021 01:50:10 +0100 Subject: [PATCH 2/2] Update poetry-schema.json --- src/poetry/json/schemas/poetry-schema.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/poetry/json/schemas/poetry-schema.json b/src/poetry/json/schemas/poetry-schema.json index fe916f1e04e..b5b5bab77a8 100644 --- a/src/poetry/json/schemas/poetry-schema.json +++ b/src/poetry/json/schemas/poetry-schema.json @@ -54,8 +54,19 @@ "$ref": "#/definitions/maintainers" }, "readme": { - "type": "string", - "description": "The path to the README file" + "anyOf": [ + { + "type": "string", + "description": "The path to the README file." + }, + { + "type": "array", + "description": "A list of paths to the readme files.", + "items": { + "type": "string" + } + } + ] }, "classifiers": { "type": "array",