Commit 147b651d by Gunung P. Wibisono Committed by GitHub

Add example for each section of `pyproject.toml` (#5585)

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
parent d049d8fd
......@@ -17,12 +17,20 @@ The `tool.poetry` section of the `pyproject.toml` file is composed of multiple s
The name of the package. **Required**
```toml
name = "my-package"
```
## version
The version of the package. **Required**
This should be a valid [PEP 440](https://peps.python.org/pep-0440/) string.
```toml
version = "0.1.0"
```
{{% note %}}
If you would like to use semantic versioning for your project, please see
......@@ -34,6 +42,10 @@ If you would like to use semantic versioning for your project, please see
A short description of the package. **Required**
```toml
description = "A short description of the package."
```
## license
The license of the package.
......@@ -61,40 +73,76 @@ More identifiers are listed at the [SPDX Open Source License Registry](https://s
If your project is proprietary and does not use a specific licence, you can set this value as `Proprietary`.
{{% /note %}}
```toml
license = "MIT"
```
## authors
The authors of the package. **Required**
This is a list of authors and should contain at least one author. Authors must be in the form `name <email>`.
```toml
authors = [
"Sébastien Eustace <sebastien@eustace.io>",
]
```
## maintainers
The maintainers of the package. **Optional**
This is a list of maintainers and should be distinct from authors. Maintainers may contain an email and be in the form `name <email>`.
```toml
maintainers = [
"Richard Brave <email@example.org>",
]
```
## readme
The readme file of the package. **Optional**
The file can be either `README.rst` or `README.md`.
```toml
readme = "README.md" # or "README.rst"
```
## homepage
An URL to the website of the project. **Optional**
```toml
homepage = "https://python-poetry.org/"
```
## repository
An URL to the repository of the project. **Optional**
```toml
repository = "https://github.com/python-poetry/poetry"
```
## documentation
An URL to the documentation of the project. **Optional**
```toml
documentation = "https://python-poetry.org/docs/"
```
## keywords
A list of keywords that the package is related to. **Optional**
```toml
keywords = ["packaging", "poetry"]
```
## classifiers
A list of PyPI [trove classifiers](https://pypi.org/classifiers/) that describe the project. **Optional**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment